Guest User

Untitled

a guest
Dec 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. noremap s :set opfunc=SensibleSubstitute<CR>g@
  2. function! SensibleSubstitute(type)
  3. normal `[v`]
  4. normal "_c<C-R>"
  5. endfunction
  6.  
  7. exec 'normal "_c'."<C-r>".'"'
  8.  
  9. noremap s :set opfunc=SensibleSubstitute<CR>g@
  10. function! SensibleSubstitute(type)
  11. echo v:register
  12. endfunction
  13.  
  14. "a:set opfunc=SensibleSubstitute<CR>g@
  15.  
  16. :set opfunc=SensibleSubstitute<CR>"ag@
  17.  
  18. noremap <expr> s ":set opfunc=SensibleSubstitute<CR>".'"'.v:register."g@"
  19. function! SensibleSubstitute(type)
  20. normal `[v`]
  21. exec 'normal "_c'."<C-r>".v:register
  22. endfunction
Add Comment
Please, Sign In to add comment