我的vim配置文件

自己之前写的文档在有道云笔记里面放了,不过为了保险起见,在这个里面也贴一下,有兴趣的人可以用用看。关于vim我用的也不算太熟,就是会简单的操作,vim太强大,还需要继续学习啊!

下面贴出我的vim配置文件。

set nu
set go=
syntax on
autocmd InsertLeave * se nocul
autocmd InsertEnter * se cul
set ruler
set showcmd
set novisualbell
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}
set laststatus=1
"set foldenable
set foldmethod=manual
"set background=dark
set nocompatible
if version >= 603
    set helplang=cn
    set encoding=utf-8
endif
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
set termencoding=utf-8
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936
set fileencoding=utf-8
nmap w :w!
nmap f :find
set autoread
autocmd FileType c,cpp map   :w:make
set completeopt=preview,menu
filetype plugin on
set clipboard+=unnamed
set nobackup
:set makeprg=g++\ -Wall\ \ %
set autowrite
set ruler
set cursorline
set magic
set guioptions-=T
set guioptions-=m
set foldcolumn=0
set foldmethod=indent
set foldlevel=3
set foldenable
set nocompatible
set syntax=on
set confirm
set autoindent
set cindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab
set smarttab
set number
set history=1000
set nobackup
set noswapfile
set ignorecase
set hlsearch
set incsearch
set gdefault
set enc=utf-8
set fencs=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936
set langmenu=zh_CN.UTF-8
set helplang=cn
set laststatus=2
set cmdheight=2
filetype on
filetype plugin on
filetype indent on
set viminfo+=!
set iskeyword+=_,$,@,%,#,-
set linespace=0
set wildmenu
set backspace=2
set whichwrap+=<,>,h,l
set mouse=a
set selection=exclusive
set selectmode=mouse,key
set report=0
set fillchars=vert:\ ,stl:\ ,stlnc:\
set showmatch
set matchtime=1
set scrolloff=3
set smartindent
au BufRead,BufNewFile *  setfiletype txt
:inoremap ( ()i
:inoremap ) =ClosePair(')')
:inoremap { {}O
:inoremap } =ClosePair('}')
:inoremap [ []i
:inoremap ] =ClosePair(']')
:inoremap " ""i
:inoremap ' ''i
function! ClosePair(char)
    if getline('.')[col('.') - 1] == a:char
        return "\"
    else
        return a:char
    endif
endfunction
filetype plugin indent on 
set completeopt=longest,menu
let Tlist_File_Fold_Auto_Close = 0
let Tlist_Enable_Fold_Column = 0
autocmd FileType java set tags+=D:\tools\java\tags
"autocmd FileType h,cpp,cc,c set tags+=D:\tools\cpp\tags
"let Tlist_Show_One_File=1
set tags=tags
let Tlist_Auto_Open=1


 

你可能感兴趣的:(vim,Vim)