美文网首页
2018-10-13 how to allow vim snea

2018-10-13 how to allow vim snea

作者: 五大RobertWu伍洋 | 来源:发表于2018-10-13 15:50 被阅读9次

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.

相关文章

网友评论

      本文标题:2018-10-13 how to allow vim snea

      本文链接:https://www.haomeiwen.com/subject/dbvoaftx.html