ubuntu 下<F4>映射编译 <F5>映射运行
短短几行
----------------------------
set fenc=utf-8
syntax on
set number
set shiftwidth=4
set tabstop=4
set autoindent
set wrap
set cindent
set nocompatible
set pastetoggle=<F3>
imap [[ {<cr>}<c-o>O
map <F4> :call CompileRunGcc()<CR>
func! CompileRunGcc()
exec "w"
exec "!g++ % -o %<"
endfunc
map <F5> :call Run()<CR>
func! Run()
exec "! ./%<"
endfunc
-----------------------------------------------------------------------
set go= cin nu ts=4 sw=4 sts=4 noswapfile nobackup acd et cursorline
set backspace=eol,start,indent
syntax on
map <F4> :!g++ -o2 -std=c++11 % -o %<<cr>
map <F5> :!%<<cr>
map <F3> :!javac %<cr>
map <F2> :!java %<<cr>
map <C-A> ggVG"+y
set guifont=Consolas:h13
colorscheme solarized
再来一段
set number
set guifont=courier_new:h14
set backspace=eol,indent,start
set history=10000
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set showmatch
set guifont=monaco:h10
"set guifont=Consolas:h11
colorscheme evening
"colorscheme evening
set nocp
filetype plugin indent on
imap [[ {<cr>}<c-o>O
imap <F8> where amazing happens
map <F4> :call CR()<CR>
func! CR()
exec "!g++ -O2 -g % -o %<"
endfunc
map<F5> :call E()<CR>
func! E()
exec "! %<"
endfunc
filetype on
syntax on
language messages zh_CN.utf-8
" vim7.1在windows下的编码设置。By Huadong.Liu
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1
if has("win32")
set fileencoding=chinese
else
set fileencoding=utf-8
endif
"解决菜单乱码
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
"解决consle输出乱码
language messages zh_CN.utf-8
imap <article><cr> <article><cr><h2 id=''></h2><cr><div><tab><cr><tab><strong>地址</strong><cr><p>http://www.wndz.me</p><cr><strong>示例</strong><cr><p>http://www.wndz.me/</p><cr><bs><bs><bs><bs><bs><bs><bs><bs></div><cr><section class='codeIn'><cr><tab><strong></strong><cr><p class='showCodeClass'><cr></p><cr><bs><bs><bs><bs><bs><bs><bs><bs></section><cr><section class='codeOut'><cr><tab><strong></strong><cr><pre><cr></pre><cr><bs><bs><bs><bs><bs><bs><bs><bs></section><cr></article>