From 2978e4f5640b72e1d352d726fd6795ccd9b5459a Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Thu, 16 Feb 2017 21:19:39 +0800 Subject: [PATCH] Fix #243 --- autoload/SpaceVim/default.vim | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index dd0e6348b..e617d3657 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -273,7 +273,13 @@ function! SpaceVim#default#SetMappings() abort nnoremap , :silent! keeppatterns %substitute/\s\+$//e " C-r: Easier search and replace - xnoremap :call VSetSearch('/'):%s/\V=@///gc + xnoremap :call VSetSearch():,$s/=@///gc + function! s:VSetSearch() abort + let temp = @s + norm! gv"sy + let @/ = '\V' . substitute(escape(@s, '/\'), '\n', '\\n', 'g') + let @s = temp + endfunction "irssi like hot key nnoremap :call tobur(1) @@ -325,5 +331,5 @@ fu! s:tobur(num) abort endf function! SpaceVim#default#UseSimpleMode() abort - + endfunction