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

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。