Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. set incsearch
  2. set hlsearch
  3. set ignorecase
  4. function GetVisualSelection()
  5. let raw_search = @"
  6. let @/=substitute(escape(raw_search, '/.*$^~[]'), "n", '\n', "g")
  7. endfunction
  8. xnoremap // ""y:call GetVisualSelection()<bar>:set hls<cr>
  9. if has('nvim')
  10. set inccommand=nosplit
  11. xnoremap /s ""y:call GetVisualSelection()<cr><bar>:%s/
  12. else
  13. xnoremap /s ""y:call GetVisualSelection()<cr><bar>:%s//
  14. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement