自己常用的命令有:
x 刪除
dd 刪除整行
J 刪除換行符
O 在當前行上例外起一行
w 一word 單位向前來移動光標
b 以word 單位來後移動光標
$ 將光標移動到該行末尾
fx 移動到指定的字符上面
% 跳轉到與當前光標下的括號相匹配的那一個括號上去。
G 跳轉到指定行上面,或者和一些搭配使用時跳到文件的末尾。
:scriptnames 可以查看vim 的啓動文件
選項設置:
:set number #to show the num in the vim for file
:set nonumber #fight with above
:set ruler #To show the mouse's location at right bottom
:set tags= #To run the ctags for vim/vi
plugin 設置:
ctags
command:
:tag xxx #Go to the xxx function define
:tags #List the tags U use
:tag/ts /xxx #U can use TAb to show contain the xxx tag
#'/'just tell vim this is a mode not a config tag
cscope
Introduction:
Can easy know where function 's define and called or
the variable parameter assignment and use.
command:
$cscope -Rbq #create database in catalog
:cs find c|d|e|f|g|i|s|t name
c:search which function call the name function
d:search name function call which function
g:search name function's define
......
配色方案:
vim的配色方案放在:
/usr/share/vim/vim71/colors
也可以在網上去下載,colorscheme freya 這個是我用的;
Vim 我常用的命令和插件
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.