vim sneak plugin use s,S in normal mode to jump to next two chars matched .
ie.
sdb,jums to next string which starts with "db"
5sdb, jumps to the 5th string which starts with "db"
this helps a lot and is faster than search mode "" in some case.
then comes the problem: vim original allow s,S in normal to work like "cl","cc"
you can see this in vim by using :help s
I was used to use s,S in normal mode as well as visual mode to replace strings in selected area since s is more convinent than c.
To allow original s,S in normal and visual mode, we have to remap it with <leader>s, and simulate c command.
Now, <leader>s,<leader>S works like original s,S in normal and visual mode.
网友评论