set nu!
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
set guioptions-=m " 隐藏菜单栏
set guioptions-=T " 隐藏工具栏
set guioptions-=L " 隐藏左侧滚动条
set guioptions-=r " 隐藏右侧滚动条
set guioptions-=b " 隐藏底部滚动条
colorscheme dusk
set guifont=Courier\ New\ 12
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936
set fileencoding=gb2312
set termencoding=utf-8
set laststatus=2
set list lcs=tab:\|\
inoremap ( ()<ESC>i
inoremap [ []<ESC>i
inoremap " ""<ESC>i
inoremap ' ''<ESC>i
inoremap ;; <ESC>o
inoremap <C-a> <esc>ggVG
inoremap <C-s> <esc>:w<CR>i
inoremap <C-v> <esc>"+Pi
inoremap <C-c> <esc>"+Yi
inoremap <C-z> <esc>ui
inoremap { {}<ESC>i<CR><ESC>O
inoremap < <<Esc>a
autocmd filetype php inoremap { {}<Esc>i
autocmd filetype html inoremap < <><Esc>i
let mapleader = ","
map <C-s> :w<CR>
map <C-a> ggVG
map <C-c> "+Y
map <C-v> "+P
map <C-z> u
map <C-n> :NERDTreeToggle<CR>
inoremap <C-n> <esc>:NERDTreeToggle<CR><C-w><C-W>i
map <F9> :call Do_OneFileMake()<CR>
inoremap <F9> <esc>:call Do_OneFileMake()<CR>
function Do_OneFileMake()
if &filetype=="java"
exec "!javac %"
exec "!gnome-terminal -t JAVA -x bash -c \"java %<;rm %<.class;read;\""
endif
if &filetype=="python"
exec "!gnome-terminal -t Python -x bash -c \"python %;read;\""
endif
if &filetype=="sh"
exec "!gnome-terminal -t SH -x bash -c \"sh %; read;\""
endif
if &filetype=="c"
exec "!gnome-terminal -t C -x bash -c \"g++ % -o %<;./%<;rm %<;read;\""
endif
if &filetype=="cpp"
exec "!gnome-terminal -t CPP -x bash -c \"g++ % -o %<;./%<;rm %<;read;\""
endif
if &filetype=="markdown"
exec "!gnome-terminal -t -MD -x bash -c\"submit.sh;read;\""
endif
normal o
exec "c"
endfunction
filetype plugin indent on
filetype on
filetype plugin on
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'Shougo/neocomplete'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/nerdcommenter'
"注释,cs 取消,cu
Bundle 'Lokaltog/vim-powerline'
Bundle 'Yggdroot/indentLine'
Bundle 'Raimondi/delimitMate'
" 括号补全yss+'一行 ysiw+‘ 一个单词 ,"{[ 删除ds+'
Bundle 'tpope/vim-surround'
Bundle 'css.vim'
Bundle 'mattn/emmet-vim'
Bundle 'tpope/vim-ragtag'
Bundle 'MatchTag'
"html标签高亮"
Bundle 'maksimr/vim-jsbeautify'
"html css js 代码格式化"
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 3
转载于:https://www.cnblogs.com/Duskcl/p/4077495.html