From f80b0cbe62c1b70062882093db074c707b79237b Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 7 Apr 2017 01:47:39 +0200 Subject: [PATCH] Make use "* instead of "" by default Startify remaps and uses v:register to paste from a specific register. The problem: Unless 'clipboard' is set to "unnamed" or "unnamedplus", v:register will default to "", whereas usually defaults to "*. Fixes #281. --- autoload/startify.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index ce3d756..cd65848 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -731,7 +731,7 @@ function! s:set_mappings() abort execute "nnoremap ". s:nowait ." v :call set_mark('V')" execute "nnoremap ". s:nowait ." :call startify#open_buffers()" execute "nnoremap ". s:nowait ." <2-LeftMouse> :call startify#open_buffers()" - execute "nnoremap ". s:nowait ." :enew execute 'normal! \"'.v:register.'gp'" + execute "nnoremap ". s:nowait ." :enew execute 'normal! \"'.(v:register=='\"'?'*':v:register).'gp'" " Without these mappings n/N wouldn't work properly, since autocmds always " force the cursor back on the index.