zoukankan      html  css  js  c++  java
  • vimrc 的配置

    windows

    syntax on
    
    set nocompatible
    set guifont=Consolas:h17
    set linespace=0
    color molokai
    set clipboard=unnamed
    set backspace=2
    set softtabstop=4 tabstop=4
    set sw=4
    set go= mouse=a
    set number ruler
    set smartindent autoindent cindent
    set cursorline
    set noswapfile nobackup
    set autoread autowrite
    set nowrap
    
    set fdm=manual
    
    map<F2> :call TexMaker() <CR>
    imap<F2> <ESC>: call TexMaker<CR>
    map<F9> :call Compile()<CR>
    imap <F9> <ESC>:call Compile()<CR>
    map<F10> :call Run()<CR>
    imap <F10> <ESC>:call Compile()<CR>
    map<F8> :call Open()<CR>
    imap <F8> <ESC>:call Open()<CR>
    
    func! TexMaker()
        exec "w"
        exec "!pdflatex %"
    endfunc
    
    func! Compile()
       exec "w" 
       exec "!g++ ./% -o ./%< -Wall -D zjp_shadow -O2 -std=c++11"
    endfunc
    
    func! Run()
       exec "! ./%<"
    endfunc
    
    func! Open()
       exec "vsp %<.in"
       exec "sp %<.out"
    endfunc
    
    map <C-j> 10j
    map <C-k> 10k
    
    autocmd bufnewfile *.cpp 0r ~/.vim/templates/c++.tpl
    
    source $VIMRUNTIME/vimrc_example.vim
    source $VIMRUNTIME/mswin.vim
    behave mswin
    
    

    linux

    syntax on
    
    set nocompatible
    " set guifont=UbuntuMono 14
    set linespace=0
    color molokai
    set backspace=2
    set softtabstop=4 tabstop=4
    set sw=4
    set go= mouse=a
    set number ruler
    set clipboard=unnamedplus
    set smartindent autoindent cindent
    set cursorline
    set noswapfile nobackup
    set autoread autowrite
    set nowrap
    
    " set fdm=syntax
    set fdm=manual
    
    map<F2> :call TexMaker() <CR>
    imap<F2> <ESC>: call TexMaker<CR>
    map<F9> :call Compile()<CR>
    imap <F9> <ESC>:call Compile()<CR>
    map<F10> :call Run()<CR>
    imap <F10> <ESC>:call Compile()<CR>
    map<F8> :call Open()<CR>
    imap <F8> <ESC>:call Open()<CR>
    
    func! TexMaker()
    	exec "w"
    	exec "!pdflatex %"
    endfunc
    
    func! Compile()
       exec "w" 
       exec "!g++ ./% -o ./%< -Wall -D zjp_shadow -O2 -std=c++11"
    endfunc
    
    func! Run()
       exec "! ./%<"
    endfunc
    
    func! Open()
       exec "vsp %<.in"
       exec "sp %<.out"
    endfunc
    
    map <C-j> 10j
    map <C-k> 10k
    
    autocmd bufnewfile *.cpp 0r ~/.vim/templates/c++.tpl
    
  • 相关阅读:
    asp的多国语言构思
    制作IE和FF都支持的无限级关联菜单
    破解网络尖兵(真正对付限制ADSL路由共享的方法)
    Asp透过系统DSN链接mysql数据库
    找到了一首曾经很喜欢的老歌
    生意人应具备的性格
    简单的操作让你的迅雷变的清爽
    线路分流自动跳转代码
    通过regsvr32注册DLL可以解决的一些疑难杂症
    页面无刷新超时自动退出
  • 原文地址:https://www.cnblogs.com/zjp-shadow/p/7291287.html
Copyright © 2011-2022 走看看