X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=keymaps.vim;h=69799d1b8b9a9b5c7573191fec57337f9e9c9fa8;hb=126e37a24c78ab5bb50fc9939eef5d0a8b4947e4;hp=b56d8db08b9b668292471420588cca4e293589ee;hpb=90f6febcf28faac867fb73a03fced39c947074e6;p=vimconf.git diff --git a/keymaps.vim b/keymaps.vim index b56d8db..69799d1 100644 --- a/keymaps.vim +++ b/keymaps.vim @@ -6,10 +6,14 @@ if has('clipboard') " override plugin keymaps. autocmd VimEnter * vnoremap "+y autocmd VimEnter * vnoremap "+x - autocmd VimEnter * nnoremap "+p - autocmd VimEnter * inoremap + + " Is performed by S+Ins + "autocmd VimEnter * nnoremap "+p + "autocmd VimEnter * inoremap + endif +" ctrl+d as EOF exits shells and the like. Add a keymap for the same here. +nnoremap :q + nnoremap :Denite file/rec nnoremap / :Denite grep:. nnoremap s :Denite buffer @@ -39,8 +43,23 @@ nmap ga (EasyAlign) au Filetype gnuplot map :call OpenIn("gnuplot -persist") -au Filetype c,cpp,objc map :vsplit:FSRight -au Filetype c,cpp,objc map :FSHere +" Performs a vertial split and a FSHere. For a header file the split is +" performed to the left, for an implementation file to the right. +function FSvsplit() + " We split to the right on header files + if match(expand('%:e'), 'h.*') >= 0 + execute ':leftabove vsplit' + else + execute ':rightbelow vsplit' + endif + + execute ':FSHere' +endfunction + +au Filetype c,cpp,objc map :call FSvsplit() +" Terminal-based vi report S-F12 as F24 +au Filetype c,cpp,objc map :FSHere +au Filetype c,cpp,objc map :FSHere au Filetype markdown map :call RunMarkdown() au Filetype asciidoc map :call RunAsciidoc()