首页 > 代码库 > gvim
gvim
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 desert
set fileencoding=utf-8
set guifont=Courier\ New\ 12
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
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()
exec "w"
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
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle ‘Shougo/neocomplete‘
Bundle ‘scrooloose/nerdtree‘
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 3
gvim