自己常用的命令有:
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 我常用的命令和插件
最新推荐文章于 2024-06-23 16:12:21 发布