From bc48d680985b7849f01d11aa6a64a4d36f4a3be8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 24 Jun 2019 09:52:21 +1200 Subject: Rename scratch.vim to scratch_buffer.vim --- vim/autoload/scratch.vim | 11 ----------- vim/autoload/scratch_buffer.vim | 11 +++++++++++ vim/plugin/scratch.vim | 2 -- vim/plugin/scratch_buffer.vim | 2 ++ vim/vimrc | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 vim/autoload/scratch.vim create mode 100644 vim/autoload/scratch_buffer.vim delete mode 100644 vim/plugin/scratch.vim create mode 100644 vim/plugin/scratch_buffer.vim diff --git a/vim/autoload/scratch.vim b/vim/autoload/scratch.vim deleted file mode 100644 index bf6566dc..00000000 --- a/vim/autoload/scratch.vim +++ /dev/null @@ -1,11 +0,0 @@ -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 diff --git a/vim/autoload/scratch_buffer.vim b/vim/autoload/scratch_buffer.vim new file mode 100644 index 00000000..c0ef7cfc --- /dev/null +++ b/vim/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/vim/plugin/scratch.vim b/vim/plugin/scratch.vim deleted file mode 100644 index 399f5a31..00000000 --- a/vim/plugin/scratch.vim +++ /dev/null @@ -1,2 +0,0 @@ -command! -bar -count=0 -nargs=* Scratch - \ call scratch#(, , ) diff --git a/vim/plugin/scratch_buffer.vim b/vim/plugin/scratch_buffer.vim new file mode 100644 index 00000000..c209c8b1 --- /dev/null +++ b/vim/plugin/scratch_buffer.vim @@ -0,0 +1,2 @@ +command! -bar -count=0 -nargs=* ScratchBuffer + \ call scratch_buffer#(, , ) diff --git a/vim/vimrc b/vim/vimrc index b9b491e9..e88fe8b0 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1627,10 +1627,10 @@ nnoremap * *N nmap 8 * "" Leader,` opens a scratch buffer, horizontally split nnoremap ` - \ :Scratch + \ :ScratchBuffer "" Leader,~ opens a scratch buffer, vertically split nnoremap ~ - \ :vertical Scratch + \ :vertical ScratchBuffer " And last, but definitely not least, I'm required by Vim fanatic law to " include a mapping that reloads my whole configuration. This uses the -- cgit v1.2.3