zoukankan      html  css  js  c++  java
  • ubuntu下vim配置(刷题和比赛两套)

    1. 平时刷题练习使用

    "mswin.vim 插件提供windows下的编辑快捷键功能
    source $VIMRUNTIME/mswin.vim
    behave mswin
    
    set nu
    set history=1000000
    set tabstop=4 
    set shiftwidth=4
    set smarttab
    set cindent
    set nobackup
    set noswapfile
    set mouse=a
    colo torte
    syntax on
    
    "设置字体
    set guifont=DejaVuSansMono 12
    "windows下 set guifont=courier_new:h12   
    set shortmess=atI   " 启动的时候不显示那个援助乌干达儿童的提示 
    winpos 400 400      " 设定窗体位置  
    set lines=60 columns=100    " 设定窗体大小  
    set guioptions-=T           " 隐藏工具栏
    set guioptions-=m           " 隐藏菜单条
    set laststatus=2 " 显示状态栏 (默认值为 1, 无法显示状态栏)
    set statusline=[%n]%<%f%y%h%m%r%= %l of %L,%c 
              " 设置在状态行显示的信息
    
    "F6编译执行
    map <F6> :call CR()<CR>
    func! CR()
    	exec "w"
    	exec "! g++ % -o %<"
    	exec "! ./%<" "windows改成 exec "! %<"
    endfunc
    
    imap <c-]> {<cr>}<c-o>O<left><right>
    "F2插入必要代码
    map <F2> :call SetTitle()<CR>
    func SetTitle()
    let l = 0
    let l = l + 1 | call setline(l, '/*')
    let l = l + 1 | call setline(l, ' * Author: yew1eb')
    let l = l + 1 | call setline(l, ' * Created Time:  '.strftime('%c'))
    let l = l + 1 | call setline(l, ' * File Name: '.expand('%'))
    let l = l + 1 | call setline(l, ' */')
    let l = l + 1 | call setline(l, '#include <ctime>')
    let l = l + 1 | call setline(l, '#include <cmath>')
    let l = l + 1 | call setline(l, '#include <cstdio>')
    let l = l + 1 | call setline(l, '#include <cstdlib>')
    let l = l + 1 | call setline(l, '#include <cstring>')
    let l = l + 1 | call setline(l, '#include <algorithm>')
    let l = l + 1 | call setline(l, '#include <iostream>')
    let l = l + 1 | call setline(l, '#include <string>')
    let l = l + 1 | call setline(l, '#include <vector>')
    let l = l + 1 | call setline(l, '#include <stack>')
    let l = l + 1 | call setline(l, '#include <queue>')
    let l = l + 1 | call setline(l, '#include <set>')
    let l = l + 1 | call setline(l, '#include <map>')
    let l = l + 1 | call setline(l, 'using namespace std;')
    let l = l + 1 | call setline(l, 'typedef long long ll;')
    let l = l + 1 | call setline(l, 'const int inf = 0x7fffffff;')
    let l = l + 1 | call setline(l, 'const ll  INF = 1e18;')
    let l = l + 1 | call setline(l, 'const double eps = 1e-8;')
    let l = l + 1 | call setline(l, 'const double pi = acos(-1.0);')
    let l = l + 1 | call setline(l, '')
    let l = l + 1 | call setline(l, 'int main() {')
    let l = l + 1 | call setline(l, '    return 0;')
    let l = l + 1 | call setline(l, '}')
    let l = l + 1 | call setline(l, '')
    endfunc
    



    2. 比赛现场使用

    syntax on
    set nu ts=4 sw=4 mouse=a cin
    colo evening
    




  • 相关阅读:
    Codeforces 1244C The Football Season (解方程)
    BZOJ 2006 [NOI2010]超级钢琴(ST表+堆)
    51Nod 1681 公共祖先(dfs+树状数组/主席树)
    CF 1076E Vasya and a Tree(dfs+树状数组)
    CF 1076 D Edge Deletion(最短路径+bfs)
    CF Gym 102059I Game on Plane(sg函数)
    POJ 2311 Cutting Game(二维sg)
    POJ 2960 S-Nim(SG函数模板题)
    CF Gym 102059F Fake Plastic Trees
    CF Gym 102059H Fractions(思维题)
  • 原文地址:https://www.cnblogs.com/lxjshuju/p/7344111.html
Copyright © 2011-2022 走看看