我在linux中使用的vundle 和 vimrc配置

set nocompatible
filetype off

set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

Plugin 'gmarik/vundle'
Plugin 'taglist.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'bling/vim-airline'
Plugin 'snipMate'
Plugin 'minibufexplorerpp'
Plugin 'Shougo/neocomplcache'
Plugin 'mattn/emmet-vim'
Plugin 'mbbill/echofunc'
""Plugin 'checksyntax.vim'

Plugin 'Valloric/MatchTagAlways'
Plugin 'thisivan/vim-matchit'

" 引入前端开放需要的词库 包括: html.dic, css.dic, javascript.dic
Bundle 'asins/vim-dict'

call vundle#end()
filetype plugin indent on

let g:user_emmet_leader_key=""

" 设置字典 文件的 路径, 这个路径就是你放 js.dict文件的目录
autocmd FileType javascript set dictionary=~/.vim/dict/javascript.dict

let Tlist_Use_Right_Window=1


/etc/vimrc的配置:

if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=ucs-bom,utf-8,gb2312,gbk,latin1
endif

set ts=4
set expandtab
set autoindent

set nocompatible " Use Vim defaults (much better!)
nmap :NERDTreeToggle
inoremap jk
set bs=indent,eol,start " allow backspacing over everything in insert mode

set mouse=a

"insert mode下也可以 快速移动到行尾和行首"
inoremap nn I
inoremap A
inoremap I
inoremap jj ji
inoremap kk ki
inoremap hh ha
inoremap ll la
set nu

"generate pair of brackets and quotes automatically
inoremap " ""i
inoremap ' ''i
" inoremap ( ()i
inoremap [ []i
inoremap { {}i

nmap "+y
nmap "+gp

let g:neocomplcache_enable_at_startup = 1

"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo='20,"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time

" Only do this part when compiled with support for autocommands
if has("autocmd")
augroup fedora
autocmd!
" In text files, always limit the width of text to 78 characters
" autocmd BufRead .txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
if line("'"") > 0 && line ("'"") <= line("$") |
exe "normal! g'"" |
endif
" don't write swapfile on most commonly used directories for NFS mounts or USB sticks
autocmd BufNewFile,BufReadPre /media/
,/run/media/,/mnt/ set directory=~/tmp,/var/tmp,/tmp
" start with spec file template
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
augroup END
endif

if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add $PWD/cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif

filetype plugin on

if &term=="xterm"
set t_Co=8
set t_Sb=[4%dm
set t_Sf=[3%dm
endif

" Don't wake up system with blinking cursor:
" http://www.linuxpowertop.org/known.php
let &guicursor = &guicursor . ",a:blinkon0"

map :silent! Tlist
" let Tlist_Ctags_Cmd='ctags' "因为我们放在环境变量里,所以可以直接执行
let Tlist_Use_Right_Window=1 "让窗口显示在右边,0的话就是显示在左边
let Tlist_Show_One_File=0 "让taglist可以同时展示多个文件的函数列表,如果想只有1个,设置为1
let Tlist_File_Fold_Auto_Close=1 "非当前文件,函数列表折叠隐藏
let Tlist_Exit_OnlyWindow=1 "当taglist是最后一个分割窗口时,自动推出vim
let Tlist_Process_File_Always=1 "是否一直处理tags.1:处理;0:不处理
let Tlist_WinHeight=100 "设置窗口高度
let Tlist_WinWidth=24 "设置窗口宽度
let Tlist_Inc_Winwidth=0
" 缺省情况下,在双击一个tag时,才会跳到该tag定义的位置,如果你想单击tag就跳转,设置Tlist_Use_SingleClick为1
let Tlist_Use_SingleClick=1

" 如果你想在启动VIM后,自动打开taglist窗口,设置
""let Tlist_Auto_Open=1

" 如果你希望在选择了tag后自动关闭taglist窗口,设置
let Tlist_Close_On_Select=1

" 当同时显示多个文件中的tag时,设置Tlist_File_Fold_Auto_Close为1,可使taglist只显示当前文件tag,其它文件的tag都被折叠起来
" let Tlist_File_Fold_Auto_Close=1

" 在使用:TlistToggle打开taglist窗口时,如果希望输入焦点在taglist窗口中,设置
let Tlist_GainFocus_On_ToggleOpen=1

"Tlist_Use_Horiz_Window为1设置taglist窗口横向显示;

"插入括号时, 短暂地跳转到匹配的对应括号"
set showmatch
set matchtime=2
set magic
set hidden "允许在有未保存的修改时, 切换缓冲区, 此时的修改由vim负责保存
set cmdheight=2 "设置命令行的高度为2行"

nnoremap @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo') " 用空格键来开关折叠

"-----------------------------------------------------------------
" plugin – checksyntax.vim JavaScript常见语法错误检查
" 默认快捷方式为 F5
"-----------------------------------------------------------------
let g:checksyntax_auto = 0 " 不自动检查


原文地址:https://www.cnblogs.com/bkylee/p/6525743.html