G0574's Archiver

弯月圆刀 发表于 2008-8-5 20:42

vi vim的块编辑

在编辑apache的配置文件的时候,总是要碰到整块的注释和反注释(block commenting)。如果一行一行的注释实在是太累了。

还好,vi有块编辑的功能。

[list=1]
[*]Ctrl + V to go into column mode 进入块模式
[*]Select the columns and rows where you want to enter your text,选择你想输入内容的列和行
[*]Shift + i to go into insert mode in column mode 进入插入模式
[*]Type in the text you want to enter. Dont be discouraged by the fact that only the first row is changed.输入你想要的内容,如果你发现只有首行变化,请不要奇怪,要耐心
[*]Esc to apply your change (or alternately Ctrl+c),奇妙的事情发生了,整列都变了。
[/list]

弯月圆刀 发表于 2008-9-17 06:14

在windows下面,Ctrl-V一般用来paster,这时可以用Ctrl-Q来代替。

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.