vim 配置
1 set tabstop=4 2 set shiftwidth=4 3 set autoindent 4 set smartindent 5 set number 6 set softtabstop=4 7 set cindent 8 syntax enable 9 set t_Co=256 10 let g:solarized_termcolors=256 11 set background=dark 12 colorscheme solarized 13 set cursorcolumn 14 set cursorline 15 nmap <silent> <F2> :TagbarToggle<CR> 16 let g:tagbar_width=25 17 nmap <silent> <F3> :NERDTreeToggle<CR> 18 let NERDTreeWinSize=25 19 20 map <F6> :call CompileRun()<CR> 21 func! CompileRun() 22 exec "w" 23 if &filetype == 'c' 24 exec "!gcc -W -g % -o %<" 25 exec "! ./%<" 26 elseif &filetype == 'cpp' 27 exec "!g++ -W -g % -o %<" 28 exec "! ./%<" 29 elseif &filetype == 'python' 30 exec "!python %" 31 elseif &filetype == 'java' 32 exec "!javac %" 33 exec "!java %<" 34 elseif &filetype == 'dot' 35 exec "!dot -Tpng % -o %<.png" 36 endif 37 endfunc 38 39 map <F4> :call SetCodeModel()<CR> 40 func SetCodeModel() 41 let l = 0 42 let l = l + 1 | call setline(l, '#include <cstdio>') 43 let l = l + 1 | call setline(l, '#include <cstring>') 44 let l = l + 1 | call setline(l, '#include <iostream>') 45 let l = l + 1 | call setline(l, '#include <algorithm>') 46 let l = l + 1 | call setline(l, '#include <cmath>') 47 let l = l + 1 | call setline(l, '#include <cstdlib>') 48 let l = l + 1 | call setline(l, '#include <vector>') 49 let l = l + 1 | call setline(l, '#include <queue>') 50 let l = l + 1 | call setline(l, '#include <set>') 51 let l = l + 1 | call setline(l, '#include <map>') 52 let l = l + 1 | call setline(l, '#include <stack>') 53 let l = l + 1 | call setline(l, '#include <string>') 54 let l = l + 1 | call setline(l, '#include <cctype>') 55 let l = l + 1 | call setline(l, '#define LL long long') 56 let l = l + 1 | call setline(l, '#define LLFmt "%lld"') 57 let l = l + 1 | call setline(l, '#define MAXN 100000') 58 let l = l + 1 | call setline(l, 'using namespace std;') 59 let l = l + 1 | call setline(l, '') 60 let l = l + 1 | call setline(l, 'int main() {') 61 let l = l + 1 | call setline(l, ' //freopen("input", "r", stdin);') 62 let l = l + 1 | call setline(l, ' //freopen("output", "w", stdout);') 63 let l = l + 1 | call setline(l, ' ') 64 let l = l + 1 | call setline(l, ' return 0;') 65 let l = l + 1 | call setline(l, '}') 66 exec "22" 67 endfunc 68 69 map <F5> :call SetCodeModel_CF()<CR> 70 func SetCodeModel_CF() 71 let l = 0 72 let l = l + 1 | call setline(l, '#include <bits/stdc++.h>') 73 let l = l + 1 | call setline(l, '') 74 let l = l + 1 | call setline(l, 'typedef long long LL;') 75 let l = l + 1 | call setline(l, 'const int MAXN = 100000;') 76 let l = l + 1 | call setline(l, 'using namespace std;') 77 let l = l + 1 | call setline(l, '') 78 let l = l + 1 | call setline(l, 'int main() {') 79 let l = l + 1 | call setline(l, ' //freopen("input", "r", stdin);') 80 let l = l + 1 | call setline(l, ' //freopen("output", "w", stdout);') 81 let l = l + 1 | call setline(l, ' ios_base::sync_with_stdio(0); cin.tie();') 82 let l = l + 1 | call setline(l, ' ') 83 let l = l + 1 | call setline(l, ' return 0;') 84 let l = l + 1 | call setline(l, '}') 85 exec "11" 86 endfunc 87 88 map <F7> :call OpenInput()<CR> 89 func OpenInput() 90 exec "vsp input" 91 exec "vertical res 20" 92 endfunc 93 94 map <F8> :call OpenFileWithThunar()<CR> 95 func OpenFileWithThunar() 96 exec "!thunar %" 97 endfunc
It's not numeral,character and punctuation .It's my life.