diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-07-23 23:34:47 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-07-23 23:34:47 +1200 |
commit | 91b0c9f47100ae2c24bc963ab22c24c76d592502 (patch) | |
tree | 9a26f5d6900534d4d207f9e2fc368be1da030679 /autoload | |
download | vim-scratch-buffer-91b0c9f47100ae2c24bc963ab22c24c76d592502.tar.gz vim-scratch-buffer-91b0c9f47100ae2c24bc963ab22c24c76d592502.zip |
Commit plugin as it stands
Extracted from my dotfiles v7.1.0
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/scratch_buffer.vim | 11 |
1 files changed, 11 insertions, 0 deletions
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 |