Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set incsearch
- set hlsearch
- set ignorecase
- function GetVisualSelection()
- let raw_search = @"
- let @/=substitute(escape(raw_search, '/.*$^~[]'), "n", '\n', "g")
- endfunction
- xnoremap // ""y:call GetVisualSelection()<bar>:set hls<cr>
- if has('nvim')
- set inccommand=nosplit
- xnoremap /s ""y:call GetVisualSelection()<cr><bar>:%s/
- else
- xnoremap /s ""y:call GetVisualSelection()<cr><bar>:%s//
- endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement