From d24a25f7959197361f0ccfd08d5e8308abb6859c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 23 Jun 2019 17:14:57 +1200 Subject: Add basic homebrew scratch buffer plugin Thanks to crose in Freenode #vim for a hint about `:help `. --- vim/autoload/scratch.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 vim/autoload/scratch.vim (limited to 'vim/autoload/scratch.vim') 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 -- cgit v1.2.3