[英]vim: insert increase numbers on the specified column?
I want to insert increase numbers on the specified column, such as the 8th column, but:r.seq 10 insert on 1st column.我想在指定的列上插入增加的数字,例如第 8 列,但是:r.seq 10 在第 1 列插入。 I try我试试
:set ve=all
8|<C-V>9jA0<ESC>gvlg<C-A>
but that's too clumsy.但这太笨拙了。
So,can i use:r?seq 10 on the 8th column if not use visincr plugin.那么,如果不使用 visincr 插件,我可以在第 8 列使用:r?seq 10。 Just like Alt funtcion of notepad++.就像notepad++的Alt功能一样。
Don't see what's wrong with g<CA>
, but as an example of alternative solution:看不出g<CA>
有什么问题,但作为替代解决方案的示例:
:call setreg('', system('seq 10'), 'b2')
Then move cursor where you want and press P
然后将 cursor 移动到您想要的位置并按P
With a bit of effort you can develop it into general purpose command/function/mapping by adding support to interactive input()
, error checking, auto-computing block width, etc.通过添加对交互式input()
、错误检查、自动计算块宽度等的支持,您可以通过一些努力将其开发为通用命令/函数/映射。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.