diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-06-03 20:18:57 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-06-03 20:18:57 +0100 |
commit | 817d78d17b0d6bdbafa5d5948999e6dec1fc4a00 (patch) | |
tree | b32ab6c98f59be66bd0acc20d0a090ca1c0ba012 | |
parent | Move ycm config from src (diff) | |
download | util-817d78d17b0d6bdbafa5d5948999e6dec1fc4a00.tar.bz2 util-817d78d17b0d6bdbafa5d5948999e6dec1fc4a00.tar.xz util-817d78d17b0d6bdbafa5d5948999e6dec1fc4a00.zip |
gvimrc
-rw-r--r-- | gvimrc | 110 |
1 files changed, 110 insertions, 0 deletions
@@ -0,0 +1,110 @@ +colors darkblue +set number +set numberwidth=4 +set columns=140 +set lines=72 +set hlsearch +set guifont=Monospace\ 9 +set tabstop=2 +set shiftwidth=2 +set nowrap +set cindent +set ic +set makeprg=b2 +set incsearch +set smartcase +set diffopt+=iwhite +tmenu ToolBar.Make Write all and make +amenu ToolBar.Make :wa\|mak
+au BufRead,BufNewFile *.ll set filetype=lex +map <F2> :cl<CR> +map <S-F2> :cl!<CR> +map <F3> :call GitDiffDir()<CR><CR> +map <C-S-F3> :call GitDiffCDir()<CR><CR> +set diffexpr=MyDiff() +map <S-F3> :VCSVimDiff<CR> +au FileType xml,xslt setlocal equalprg=xmllint\ --format\ --recover\ - +au FileType javascript setlocal equalprg=python\ -m\ json.tool +au FileType cpp,h map <F4> :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR> +au FileType cpp,h map <S-F4> :sp %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp,<CR> +au FileType c,cpp,jam,h,slice map <F5> :wa<CR>:set makeprg=b2\ -qj3<CR>:mak<CR> +au FileType c,cpp,jam,h,slice map <C-F5> :wa<CR>:set makeprg=b2\ -qj3\ pch=off<CR>:mak<CR> +au FileType c,cpp,jam,h,slice map <S-F5> :wa<CR>:set makeprg=b2\ -qj3\ variant=release<CR>:mak<CR> +au FileType c,cpp,jam,h,slice map <F6> :wa<CR>:set makeprg=b2\ -q<CR>:mak<CR> +au FileType dot map <F5> :wa<CR>:set makeprg=dot\ %\ -Tpng\ -O<CR>:mak<CR><CR> +map <F7> :lnext<CR> +map <S-F7> :lprev<CR> +map <F8> :cn<CR> +map <S-F8> :cN<CR> +map <F9> gg=G +map <F11> :YcmForceCompileAndDiagnostics<CR> +set wildmode=longest:full +set wildmenu +set autoread +set enc=utf8 +set foldenable +set foldmethod=syntax +set foldcolumn=4 +set foldlevel=100 + +function! SvnDiffDir() + let output = substitute(system('pwd | md5sum | cut -b-32'), "\n", "", "") + let path = "/tmp/svndiff-".output.".patch" + execute "!svn diff --force --no-diff-deleted -x -b > ".path + execute "!dos2unix ".path + execute "e ".path +endfunction +function! HgDiffDir() + let output = substitute(system('pwd | md5sum | cut -b-32'), "\n", "", "") + let path = "/tmp/hgdiff-".output.".patch" + execute "!hg diff -p -b > ".path + execute "!dos2unix ".path + execute "e ".path +endfunction +function! GitDiffDir() + let output = substitute(system('pwd | md5sum | cut -b-32'), "\n", "", "") + let path = "/tmp/gitdiff-".output.".patch" + execute "!git diff --no-prefix --relative -b -M > ".path + execute "!dos2unix ".path + execute "e ".path +endfunction +function! GitDiffCDir() + let output = substitute(system('pwd | md5sum | cut -b-32'), "\n", "", "") + let path = "/tmp/gitdiffc-".output.".patch" + execute "!git diff --no-prefix --cached --relative -b -M > ".path + execute "!dos2unix ".path + execute "e ".path +endfunction +function! MyDiff() + let opt = "" + if &diffopt =~ "icase" + let opt = opt . "-i " + endif + if &diffopt =~ "iwhite" + let opt = opt . "-b " + endif + silent execute "!diff -ad --binary " . opt . v:fname_in . " " . v:fname_new . + \ " > " . v:fname_out +endfunction + +let g:ycm_extra_conf_globlist = ['~/*','!~/*'] +let g:ycm_register_as_syntastic_checker = 1 +let g:ycm_always_populate_location_list = 1 +let g:ycm_autoclose_preview_window_after_insertion = 1 +let g:ycm_show_diagnostics_ui = 1 +let g:ycm_error_symbol = '>>' +let g:ycm_warning_symbol = '--' +let g:ycm_enable_diagnostic_signs = 1 +let g:ycm_enable_diagnostic_highlighting = 1 +let g:ycm_echo_current_diagnostic = 1 +let g:ycm_open_loclist_on_ycm_diags = 1 +let g:syntastic_always_populate_loc_list = 0 + +:highlight ExtraWhitespace ctermbg=red guibg=red +:match ExtraWhitespace /\s\+$\| \+\ze\t|^\t*\zs \+/ + +map <S-C-F11> :%!xsltproc ~/football-cont/conductor-opta-football/src/main/resources/transforms/xslt/f1-f8.xslt '%'<CR> +map <S-C-F12> :%!xsltproc ~/football-cont/conductor-opta-football/src/main/resources/transforms/xslt/f26-f8.xslt '%'<CR> +map <S-F11> :N!<CR> +map <S-F12> :n!<CR> + |