vim 功能增强
时间:2010-04-28 来源:xxha000721
I made some tricks today. it's really very interesting~ you can do it as follow~
1. copy files to /root
[root@localhost ~]# cp -r /home/xxha/Desktop/vimrc/.vim .
[root@localhost ~]# cp /home/xxha/Desktop/vimrc/.vimrc . 2. run ctags -R, [root@localhost ~]# cd /opt/STM/STAPI_SDK/
[root@localhost STAPI_SDK]# ls
apilib bin docs stapp stdebug
[root@localhost STAPI_SDK]# ctags -R
[root@localhost STAPI_SDK]#
[root@localhost STAPI_SDK]# ls
apilib bin docs stapp stdebug tags 3. then you can run vim . but only in the dir of /STAPI_SDK, and you should take care when use "save as", it will save to the dir /STAPI_SDK
[root@localhost STAPI_SDK]# vim apilib/src/staudlx/src/staud.c 4. quick buttons: ctrl+w+h ,you can turn to func name~ ctrl+w+l ,you can turn to func body~ the mouse moves to the func name of the source ,use ctrl+],you can turn to the def of the func. it's really quick ,convenient operation~ 5. the ctags -R source : " Tag list (ctags)
set tags=tags
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
let Tlist_Show_One_File = 1
let Tlist_Exit_OnlyWindow = 1
let Tlist_Auto_Open = 1
let Tlist_WinWidth = 40
" show line number
set number
set ignorecase
[root@localhost ~]# cp /home/xxha/Desktop/vimrc/.vimrc . 2. run ctags -R, [root@localhost ~]# cd /opt/STM/STAPI_SDK/
[root@localhost STAPI_SDK]# ls
apilib bin docs stapp stdebug
[root@localhost STAPI_SDK]# ctags -R
[root@localhost STAPI_SDK]#
[root@localhost STAPI_SDK]# ls
apilib bin docs stapp stdebug tags 3. then you can run vim . but only in the dir of /STAPI_SDK, and you should take care when use "save as", it will save to the dir /STAPI_SDK
[root@localhost STAPI_SDK]# vim apilib/src/staudlx/src/staud.c 4. quick buttons: ctrl+w+h ,you can turn to func name~ ctrl+w+l ,you can turn to func body~ the mouse moves to the func name of the source ,use ctrl+],you can turn to the def of the func. it's really quick ,convenient operation~ 5. the ctags -R source : " Tag list (ctags)
set tags=tags
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
let Tlist_Show_One_File = 1
let Tlist_Exit_OnlyWindow = 1
let Tlist_Auto_Open = 1
let Tlist_WinWidth = 40
" show line number
set number
set ignorecase
|
相关阅读 更多 +