diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-23 17:14:57 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-23 17:20:54 +1200 |
commit | d24a25f7959197361f0ccfd08d5e8308abb6859c (patch) | |
tree | d65cbd5d6526905168b46ab47458a54a456d4c09 /vim/autoload | |
parent | Have a little fun with compatible vi (diff) | |
download | dotfiles-d24a25f7959197361f0ccfd08d5e8308abb6859c.tar.gz dotfiles-d24a25f7959197361f0ccfd08d5e8308abb6859c.zip |
Add basic homebrew scratch buffer plugin
Thanks to crose in Freenode #vim for a hint about `:help <mods>`.
Diffstat (limited to 'vim/autoload')
-rw-r--r-- | vim/autoload/scratch.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vim/autoload/scratch.vim b/vim/autoload/scratch.vim new file mode 100644 index 00000000..bf6566dc --- /dev/null +++ b/vim/autoload/scratch.vim @@ -0,0 +1,11 @@ +function! scratch#(mods, count, ...) abort + let command = [] + call add(command, a:mods) + if a:count + call add(command, a:count) + endif + call add(command, 'new') + call extend(command, a:000) + execute join(command) + set buftype=nofile +endfunction |