From 91b0c9f47100ae2c24bc963ab22c24c76d592502 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 23 Jul 2019 23:34:47 +1200 Subject: Commit plugin as it stands Extracted from my dotfiles v7.1.0 --- autoload/scratch_buffer.vim | 11 +++++++++++ plugin/scratch_buffer.vim | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 autoload/scratch_buffer.vim create mode 100644 plugin/scratch_buffer.vim diff --git a/autoload/scratch_buffer.vim b/autoload/scratch_buffer.vim new file mode 100644 index 0000000..c0ef7cf --- /dev/null +++ b/autoload/scratch_buffer.vim @@ -0,0 +1,11 @@ +function! scratch_buffer#(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 diff --git a/plugin/scratch_buffer.vim b/plugin/scratch_buffer.vim new file mode 100644 index 0000000..c209c8b --- /dev/null +++ b/plugin/scratch_buffer.vim @@ -0,0 +1,2 @@ +command! -bar -count=0 -nargs=* ScratchBuffer + \ call scratch_buffer#(, , ) -- cgit v1.2.3