aboutsummaryrefslogtreecommitdiff
path: root/autoload/scratch_buffer.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/scratch_buffer.vim')
-rw-r--r--autoload/scratch_buffer.vim11
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