some advance tips in using vim
时间:2006-09-30 来源:Xi4oyu
1.we can use :set command to set the env for input
for example:
set ai (autoindent) makes the next line's first char head with the pre line's char
set nu show the number of the line
we also can use :set all to see all then env
2.we can use ab(abbreviation) for some abbreviation while inputing the text
for example:
:ab uno Unix Operating System
next time when we enter "uno" which separated by the space ,_uno_ automatically change to "Unix Operating System"
we can use unab to cancel it: : unab uno
To see all the defined abbreviation,use :ab [return ]
3.we use map command to map one key to present the command contributed by some keys
Here is the example: man q 5dd so when we in the command mode ,if we press "p" we actually equal pressed "5dd",so we got 5lines delete form our text
use unmap p to cancel this map
tips:Only a few key can be map to this command like K V q [ctrl-e] and [ctrl -x]
we also can use #n (n is a number between 1-12) for Fn to map the command.
for example:
set ai (autoindent) makes the next line's first char head with the pre line's char
set nu show the number of the line
we also can use :set all to see all then env
2.we can use ab(abbreviation) for some abbreviation while inputing the text
for example:
:ab uno Unix Operating System
next time when we enter "uno" which separated by the space ,_uno_ automatically change to "Unix Operating System"
we can use unab to cancel it: : unab uno
To see all the defined abbreviation,use :ab [return ]
3.we use map command to map one key to present the command contributed by some keys
Here is the example: man q 5dd so when we in the command mode ,if we press "p" we actually equal pressed "5dd",so we got 5lines delete form our text
use unmap p to cancel this map
tips:Only a few key can be map to this command like K V q [ctrl-e] and [ctrl -x]
we also can use #n (n is a number between 1-12) for Fn to map the command.
相关阅读 更多 +