sudo apt-get install vim-gnome
GVIM配置:
在 家目录 ( ~/ ) 下建立 .vimrc 或者 _vimrc 文件。然后进行普通 VIM(GVIM) 配置即可。
syntax on
set hls
set nocompatible
set wrap
set expandtab
set cindent
set number
set nobackup
set softtabstop=4
set shiftwidth=4
set tabstop=4
set backspace=eol,indent,start
set guifont=Consolas:h10
set encoding=cp936
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936
set termencoding=utf-8
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nmap wx <C-w>x
nmap <F7> :vsp %<.in <CR>
nmap <F12> :!python <CR>
autocmd FileType c,cpp nmap <F8> <ESC>:w <CR><ESC>:!g++ % -std=c++11 -o %< <CR>
autocmd FileType c,cpp nmap <F9> :!%< <%<.in <CR>
autocmd FileType c,cpp nmap <F10> :!%< <CR>
autocmd FileType java nmap <F8> <ESC>:w <CR><ESC>:!javac %<.java <CR>
autocmd FileType java nmap <F9> :!java %< <%<.in <CR>
autocmd FileType java nmap <F10> :!java % <CR>
"设置配色方案
colorscheme desert
source $VIMRUNTIME/mswin.vim
behave mswin