[转]vim ctags使用方法
来源:互联网 发布:淘宝人物图片后期调色 编辑:程序博客网 时间:2024/04/30 11:34
原文:http://www.cnblogs.com/feisky/archive/2012/02/07/2341932.html
windows下很多人都使用source insight编写和查看代码。linux下可以使用VIM,刚开始会觉得VIM像windows下的记事本,而如果使用得当,它并不比sourceinsight 逊色。
一、用好系统自带软件ctags
大部分的unix系统都有ctags软件,它能跟vim很好地合作。
用途:
用法:
二、需要额外安装的脚本:
1、taglist
下载地址http://www.vim.org/scripts/script.php?script_id=273
若你下载时地址已改变,请到 www.vim.org 找到正确的地址,这很简单。
用途:
用法:
三、基础知识探讨
VIM的配置文件一般放在用户主文件夹下,也就是非root状态时在终端运行
".vimrc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"For ctags, then it can find the 'tags' file even not in currentdirectory
set tags=tags;/
"Get out of VI's compatible mode..
set nocompatible
"Sets how many lines of history VIM har to remember
set history=400
"Set to auto read when a file is changed from the outside
set autoread
"Have the mouse enabled all the time:
"when you need to copy from vim, maybe you have to ':set mouse='first
set mouse=a
"""""""""""""""""""""""""""""""""""""
" Colors and Fonts
"""""""""""""""""""""""""""""""""""""
"Enable syntax highlight
syntax enable
"set colorscheme
colorscheme elflord
"endif
"""""""""""""""""""""""""""""""""""""
" VIM userinterface
"""""""""""""""""""""""""""""""""""""
"Set 7 lines to the curors away from the border- when movingvertical..
set so=7
"Turn on WiLd menu
set wildmenu
"Always show current position
set ruler
"The commandbar is 2 high
set cmdheight=2
"Show line number
set nu
"Set backspace
set backspace=eol,start,indent
"Bbackspace and cursor keys wrap to
set whichwrap+=<,>,h,l
"show matching bracets
set showmatch
"How many tenths of a second to blink
set mat=2
"Highlight search things
set hlsearch
"imediately show the search result
set is
"""""""""""""""""""""""""""""""""""""
" Folding
"""""""""""""""""""""""""""""""""""""
"Enable folding, I find it very useful
set nofen
set fdl=0
"""""""""""""""""""""""""""""""""""""
" Text options
"""""""""""""""""""""""""""""""""""""
set expandtab
set shiftwidth=2
set ambiwidth=double
set smarttab
"Set Tab=4 spaces
set ts=4
set lbr
set tw=500
set selection=inclusive
"Encoding settings
if has("multi_byte")
else
endif
"""""""""""""""""""""""""""""""""""""
"plugins
"""""""""""""""""""""""""""""""""""""
" Tlist
if &diff
let Tlist_Auto_Open=0 "don't auto pen when compare two files
else
let Tlist_Auto_Open=1 "auto pen Tlist when open a file
endif
"set taglist window in right, delete the following line if youdon't like
let Tlist_Use_Right_Window=1
let Tlist_Auto_Update=1
let Tlist_File_Fold_Auto_Close=1
"auto close Tlist when exiting file.
let Tlist_Exit_OnlyWindow = 1
nmap <F7>:copen<CR>
nmap <F6>:cclose<CR>
- [转]vim ctags使用方法
- (转)vim ctags使用方法
- vim: 自动更新ctags
- vim ctags 的使用方法
- vim ctags使用方法
- vim ctags使用方法
- vim ctags使用方法
- vim ctags使用方法
- vim ctags使用方法
- vim ctags使用方法
- linux下ctags+vim使用方法
- [转]vim 中Ctags的安装和使用
- [转]vim 中Ctags的安装和使用
- [转]vim+ctags用法
- vi/vim 基本使用方法
- [转]使用Vim + Cscope/Ctags
- 【转】使用vim + cscope/ctags
- 玩转vim之vim插件Ctags
- [原]Django 中的autofield()
- [转]数据库主键选择策略
- [转]javaScript 数值型和字符串型…
- [转](整理)ubuntu10.10安装低版…
- [转]设置vim C的语法高亮及自动缩…
- [转]vim ctags使用方法
- [转]解决root用户登录Ubuntu12.04L…
- [转]py2exe打包发布wxPython程序
- [转]9.2 使用标准对话框 [wxPython…
- 我的博客今天0岁293天了,我领取了…
- [转]文本输入控件wx.TextCtrl
- [转]Unicode、GBK、UTF-8、ASCII的…
- [转]Python实例讲解 -- wxpython …
- [转]Python编程语言与Java的性能比…