Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func! GetSearch(pat)
- let l:ss = &selection
- let &selection = "inclusive"
- let l:rs = @@
- let l:v = ''
- if search(a:pat, 'W')
- call search(a:pat, 'esW')
- normal! v``y
- let l:v = @@
- endif
- let &selection = l:ss
- let @@ = l:rs
- return l:v
- endfunc
Advertisement
Add Comment
Please, Sign In to add comment