有已定义的宏
:umap key 删除该键的宏 :ab string1 string2 定义一个缩写,使得当插入string1时,用string2替换string1。当要插入文本时,键入string1然后按Esc键,系统就插入了string2 :ab 显示所有缩写 :una string 取消string的缩写
在vi中缩进文本
选项 作用
^i(ctrl+i)或tab 插入文本时,插入移动的宽度,移动宽度是事先定义好的
:set ai 打开自动缩进 :set sw=n 将移动宽度设置为n个字符
n<< 使n行都向左移动一个宽度
n>> 使n行都向右移动一个宽度,例如3>>就将接下来的三行每行都向右移动一个移动宽度
个人心得-vi编辑器的快捷使用
有已定义的宏:umapkey删除该键的宏:abstring1string2定义一个缩写,使得当插入string1时,用string2替换string1。当要插入文本时,键入string1然后按Esc键,系统就插入了string2:ab显示所有缩写:unastring
推荐度:





点击下载文档文档为doc格式