如何在 Vim 中特定列的所有行中插入特定字符?
Dates
=======
Name | Date
-------------------------------------------------
* Battle of the Plains of Abraham | September 13, 1759
* Proclamation Act | October 07, 1763
* Stamp Act | March 22, 1765
* Guy Carleton becomes Governor | April 07, 1766
* Boston Tea Party | December 16, 1773
* Quebec Act |
* Declaration of Independance | <====== # How do I insert this bar character
* Treaty of Paris # along the whole column?
* Constitutional Act
* French Revolution
* War of 1812
我希望能够插入该条形字符,而不必手动插入它。 虽然这在语法上不正确,但这应该是降价的。
Dates
=======
Name | Date
-------------------------------------------------
* Battle of the Plains of Abraham | September 13, 1759
* Proclamation Act | October 07, 1763
* Stamp Act | March 22, 1765
* Guy Carleton becomes Governor | April 07, 1766
* Boston Tea Party | December 16, 1773
* Quebec Act |
* Declaration of Independance | <====== # How do I insert this bar character
* Treaty of Paris # along the whole column?
* Constitutional Act
* French Revolution
* War of 1812
I want to be able to insert that bar character without having to manually go and insert it.
While this is not syntactically correct, this is supposed to be markdown.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我只是一个初学者,但我是这样做的:
Cv
进入Visual Block
(在Windows上使用Cq
)hjkl
)I
Esc
I'm only a beginner, but here's what I do:
C-v
to enterVisual Block
(UseC-q
on windows)hjkl
)I
Esc
一些注意事项:
:
$ ex file
但在这种情况下添加一个:
。 cmdsx
作为第四行Some notes:
:
in front of each line if you are in vi's normal visual mode$ ex file < cmds
but in that case add anx
as the fourth line