我怎么能把像“=========="这样的行?在 vim 中快速 [英] How can I a put a line like "==========" quickly in vim
本文介绍了我怎么能把像“=========="这样的行?在 vim 中快速的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编辑重组文本文件.我经常需要在一行中放置一些像=-`~"这样的字符,并且我希望该行的长度与前一行匹配.我应该如何在 vim 中执行此操作?
I am editing restructuredtext files. I often need to put some charactors like "=-`~" in one line, and I want the length of the line match the previous line. How should I do this in vim?
a long long title
=================
谢谢!
推荐答案
yyp:s/./=/g
怎么样?
您可以将其映射到一个键,例如:map
You can map that to a key, e.g.
:map <F5> yyp:s/./=/g<CR>
这篇关于我怎么能把像“=========="这样的行?在 vim 中快速的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文