我的vim 最简单配置

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>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值