5

求助[vim]:有什么快捷键可以自动的在句尾添加分号;

 2 years ago
source link: https://www.v2ex.com/t/798135
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
求助[vim]:有什么快捷键可以自动的在句尾添加分号; - V2EX

V2EX  ›  Vim

求助[vim]:有什么快捷键可以自动的在句尾添加分号;

  charlesliu · 32 分钟前 · 77 次点击

A;ESC还是不太方便, google 了,但是由于是刚学 vim,还不太懂,就来这里向老哥先讨个答案,回头再慢慢了解

2 条回复    2021-08-26 14:29:27 +08:00

byzf

byzf   22 分钟前

korokke

korokke   20 分钟前

加到.vimrc 里面,可以在句尾添加分号同时光标位置不变。再怎么样也要两个键,只用一个键的话没啥好办法,分号本身有自己的作用。
nnoremap <Leader>; m'A;<ESC>`'

关于   ·   帮助文档   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   3409 人在线   最高记录 5497   ·  

创意工作者们的社区

World is powered by solitude

VERSION: 3.9.8.5 · 16ms · UTC 06:50 · PVG 14:50 · LAX 23:50 · JFK 02:50
♥ Do have faith in what you're doing.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK