2018-10-13 how to allow vim sneak along with substitution command s

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.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容