标签:
set nocompatible "非兼容模式,使用vim高级特性 set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1 syntax on set tabstop=4 " 文件中一个 <Tab> 占据的空格数。 set shiftwidth=4 " 每一级自动缩进的空格数。 "set expandtab " 使用合适数目的空格插入 <Tab>. set smarttab " 当打开时,行首的 <Tab> 会按照 ‘shiftwidth‘ 插入空白 "set showcmd " 在状态栏中显示(部分)命令。 set number " 显示行号。 set showmatch " When a bracket is inserted, briefly jump to the matching set hlsearch " 当有一个符合之前搜索的值时,高亮所有匹配 set incsearch " 当输入搜索命令时,离开显示符合与目前输入的模式匹配的内容 set ignorecase " 在搜索中忽略大小写 set smartcase " 如果搜索中有大写字符,忽略 ‘ignorecase‘ 选项 set backspace=2 " Influences the working of <BS>, <Del>, CTRL-W set autoindent " 当开始新行时复制当前行的缩进 "set textwidth=79 " Maximum width of text that is being inserted. A longer set formatoptions=c,q,r,t " This is a sequence of letters which describes how set ruler " 显示当前光标位置的行号和列号,用逗号分割 set background=dark " 当设置为 "dark" 时,Vim 会尝试使用在暗色背景中合适的颜色。 "set mouse=a " 启用鼠标的使用 "autocmd FileType h,c,cpp set expandtab set cinoptions=g0,N-s,:0,(0 "imap { {}<ESC>i<CR><ESC>O "imap ( ()<ESC>i "imap [ []<ESC>i set pastetoggle=<F9> colorscheme delek filetype plugin indent on "vim跳转到上次的位置 "au BufReadPost * if line("‘\"") > 0 |if line("‘\"") <= line("$")|exe("norm‘\"")|else|exe "norm $" "|endif|endifset viminfo=‘1000,f1,<500 "set tag=~/work/server/tags """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " cscope setting " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" if has("cscope") set csprg=/usr/bin/cscope set csto=1 set cst set nocsverb " add any database in current directory if filereadable("/home/liqiang/mytag/cscope.out") cs add ~/work/server/cscope.out endif set csverb endif nmap <C-\>s :cs find s <C-R>=expand("<cword>")<CR><CR> nmap <C-\>g :cs find g <C-R>=expand("<cword>")<CR><CR> nmap <C-\>c :cs find c <C-R>=expand("<cword>")<CR><CR> nmap <C-\>t :cs find t <C-R>=expand("<cword>")<CR><CR> nmap <C-\>e :cs find e <C-R>=expand("<cword>")<CR><CR> nmap <C-\>f :cs find f <C-R>=expand("<cfile>")<CR><CR>
标签:
原文地址:http://www.cnblogs.com/yisunfc/p/4725822.html