In Vim http://en.wikipedia.org/wiki/Vim_%28text_editor%29,如何在所选内容的每行开头插入字符?
例如,我想通过前置来注释掉一段代码//
在每一行的开头假设我的语言的注释系统不允许像这样的块注释/* */
。我该怎么做?
- Press Esc to enter 'command mode'
- Use Ctrl+V to enter visual block mode
- Move Up/Downto select the columns of text in the lines you want to
comment.
- Then hit Shift+i and type the text you want to insert.
- Then hit Esc, wait 1 second and the inserted text will appear on every line.
如需更多信息和阅读,请查看“多行插入文本 https://vim.wikia.com/wiki/Inserting_text_in_multiple_lines” 在 Vim 技巧 Wiki 中。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)