常用的vim插件及vimrc备份

1. taglist.

下载地址: http://www.vim.org/scripts/script.php?script_id=273

2. syntastic. 语法检查插件。

下载地址: http://www.vim.org/scripts/script.php?script_id=2736

3. NERD commenter. 注释插件。

下载地址: http://www.vim.org/scripts/script.php?script_id=1218

4. minibufexpl. 多文件浏览插件。

下载地址: http://www.vim.org/scripts/script.php?script_id=159

5. load_template. 加载模板插件。

下载地址: http://www.vim.org/scripts/script.php?script_id=2957


vimrc文件

"----------文件编码设置----------
set fileencodings=utf-8,chinese,latin-1
set fileencoding=utf-8
set encoding=cp936

"----------普通设置----------
"let mapleader=","  
let OmniCpp_ShowPrototypeInAbbr=1  
set tabstop=4   "设置tab键宽度  
set backspace=2 "设置退格键可用  
set nu!         "显示行号  
set wrap        "自动换行  
set autoread  
  
"----------查找/替换相关的设置----------  
set hlsearch    "高亮显示搜索结果  
set incsearch  
  
"----------状态栏相关的设置----------  
set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%]   "状态行的格式  
set laststatus=2    "总是显示状态栏  
set ruler           "在右下角显示光标位置的状态行  
  
"----------编程相关的设置----------  
set completeopt=longest,menu    "关掉智能补全时的预览窗口  
filetype plugin indent on  
syntax on       "语法高亮  
set showmatch   "设置匹配模式,输入左括号时会匹配相应的右括号  
set smartindent "智能对齐方式  
set shiftwidth=4    "换行时行间交错使用4个空格  
set autoindent      "自动对齐  
set ai!             "自动缩进  
colorscheme koehler  
set makeprg=g++\ -g\ -O2\ -Wall\ -std=c++0x\ %  
  
"----------代码折叠----------  
set foldmethod=syntax  
set foldlevel=100  
  
"----------去掉交换文件和备份----------  
set noswapfile  
set nobackup  
  
"----------用于快速编辑vimrc文件----------  
map <silent> <leader>ss :source $vim/_vimrc<cr>  
map <silent> <leader>ee :e $vim/_vimrc<cr>  
  
"----------用于tags----------  
set tags=./tags,f:/acm/stl_tags  
map <silent> <leader>tag :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q<cr>  
  
"----------用于TagList----------  
let Tlist_Show_One_File=1  
let Tlist_Exit_OnlyWindow=1  
let Tlist_Use_Right_Window=1  
"let Tlist_Auto_Open=1  
  
"----------用于windows下最大化窗口----------  
map <M-Space> :simalt ~<CR>  
autocmd GUIEnter * simalt ~x  
  
"----------用于minibufexpl----------  
let g:miniBufExplMapWindowNavVim=1  
let g:miniBufExplMapWindowNavArrows=1  
let g:miniBufExplMapCTabSwitchBufs=1  
let g:miniBufExplModSelTarget=1   
  
"----------用于syntastic----------  
let g:syntastic_cpp_compiler='g++'  
let g:syntastic_cpp_compiler_options=' -std=c++0x -g'  
  
"----------用于template----------  
let g:template_path='f:\Vim\vimfiles\template\'

"----------用于LaTeX-suite-----------
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on

" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值