个人习惯用的window 下 gvim配置文件
1:将下面文件内容复制到_vimrc,然后放到 vim/目录下即可
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vimbehave mswin
"关闭兼容模式
set nocompatible
"总是显示状态栏 设置状态栏
set laststatus=2
"set statusline=[%n]\ %f%m%r%h\ %=\[\ %l,%c\ \ %p%%\ \]
"set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%]
"set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}
"highlight StatusLine ctermfg=white ctermbg=blue
set mouse=a
"match WhitespaceEOL /\s\+$/
"highlight Comment ctermfg=6 guifg=6
set wildmenu
set nu
set tabstop=4
set hls
set guioptions-=m
set guioptions-=T
set guifont=Monospace\ 11
set ai
set si
set cindent
"set softtabstop=4
"set ts=4
"set expandtab
"set shiftwidth=4
set nobackup
set nowb
set noswapfile
"Set mapleader
let mapleader = ","
let g:mapleader = ","
"syntax enable
"syntax on
set t_Co=256
set ignorecase
colorscheme wangcq327_20170620
syntax enable
syntax on
let Tlist_Ctags_Cmd = './ctags.exe'
"Gvim打开最大化窗口
if has('win32')
au GUIEnter * simalt ~x
else
au GUIEnter * call MaximizeWindow()
endif
function! MaximizeWindow()
silent !wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
endfunction
"plugin---------------------------------------------------- Tags
set tags=./tags,./../tags,./../../tags,./../../../tags,./../../../../tags,./../../../../../tags,./../../../../../../tags,./../../../../../../../tags,./../../../../../../../../tags,./../../../../../../../../../tags,./../../../../../../../../../../tags,./../../../../../../../../../../../tags,./../../../../../../../../../../../../tags,./../../../../../../../../../../../../../tags,./../../../../../../../../../../../../../../tags
"plugin---------------------------------------------------- neocomplcache
"let g:neocomplcache_enable_at_startup = 1
"plugin---------------------------------------------------- TlistToggle
nmap <F2> :TlistToggle<cr>
let Tlist_Show_One_File = 1 "不同时显示多个文件的tag,只显示当前文件的
let Tlist_Exit_OnlyWindow = 1 "如果taglist窗口是最后一个窗口,则退出vim
let Tlist_Use_Right_Window = 0 "在右侧窗口中显示taglist窗口 (默认是0
"let Tlist_WinWidth = 40
"plugin---------------------------------------------------- NERDTree
map <F3> :NERDTreeMirror<CR>
map <F3> :NERDTreeToggle<CR>
let g:NERDTreeWinPos="left"
let g:NERDTreeWinSize=25
let g:NERDTreeShowLineNumbers=1
"plugin---------------------------------------------------- airline
"设置切换Buffer快捷键"
"nnoremap <C-N> :bp<CR>
nnoremap <C-P> :bn<CR>
"let g:airline_theme="luna"
"这个是安装字体后 必须设置此项"
"let g:airline_powerline_fonts = 1
"打开tabline功能,方便查看Buffer和切换,这个功能比较不错"
"我还省去了minibufexpl插件,因为我习惯在1个Tab下用多个buffer"
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
" 关闭状态显示空白符号计数,这个对我用处不大"
let g:airline#extensions#whitespace#enabled = 0
let g:airline#extensions#whitespace#symbol = '!'
"let g:airline#extensions#tabline#enabled = 1
"let g:airline_theme='bubblegum'
"let g:airline_powerline_fonts = 1
"plugin---------------------------------------------------- LookupFile
"F5
let g:LookupFile_MinPatLength = 4 "最少输入2个字符才开始查找
let g:LookupFile_PreserveLastPattern = 0 "不保存上次查找的字符串
let g:LookupFile_PreservePatternHistory = 1 "保存查找历史
let g:LookupFile_AlwaysAcceptFirst = 1 "回车打开第一个匹配项目
let g:LookupFile_AllowNewFiles = 0 "不允许创建不存在的文件
let g:LookupFile_SortMethod = "" "关闭对搜索结果的字母排序
if filereadable("./filenametags") "设置tag文件的名字
let g:LookupFile_TagExpr ='"./filenametags"'
endif
"remember lastest position
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif