1 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
7 set clipboard+=unnamedplus
12 " Ordinary ctrl+{c,x,v} using system clipboard register +. We use autocmd to
13 " override plugin keymaps.
14 "autocmd VimEnter * vnoremap <C-c> "+y
15 "autocmd VimEnter * vnoremap <C-x> "+x
16 " Is performed by S+Ins
17 "autocmd VimEnter * nnoremap <C-v> "+p
18 "autocmd VimEnter * inoremap <C-v> <c-r>+
21 " ctrl+d as EOF exits shells and the like. Add a keymap for the same here.
24 nnoremap <C-p> :Denite file/rec<cr>
25 nnoremap <space>/ :Denite grep:.<cr>
26 nnoremap <space>s :Denite buffer<cr>
28 nnoremap <C-space> pumvisible() ? "\<c-n>" : "\<tab>"
30 nnoremap <F2> :NERDTreeToggle<cr>
31 nnoremap <F3> :TagbarToggle<cr>
33 nmap <s-PageDown> :bn<CR>
34 nmap <s-PageUp> :bp<CR>
36 map <a-c> <plug>NERDCommenterToggle
38 imap <C-k> <Plug>(neosnippet_expand_or_jump)
39 smap <C-k> <Plug>(neosnippet_expand_or_jump)
40 xmap <C-k> <Plug>(neosnippet_expand_target)
42 " Start interactive EasyAlign in visual mode (e.g. vipga)
43 vmap <Enter> <Plug>(EasyAlign)
44 " Start interactive EasyAlign for a motion/text object (e.g. gaip)
45 nmap ga <Plug>(EasyAlign)
48 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
49 " Some filetype-specific settings
51 au Filetype gnuplot map <buffer> <F5> :call OpenIn("gnuplot -persist") <CR>
53 " Performs a vertial split and a FSHere. For a header file the split is
54 " performed to the left, for an implementation file to the right.
56 " We split to the right on header files
57 if match(expand('%:e'), 'h.*') >= 0
58 execute ':leftabove vsplit'
60 execute ':rightbelow vsplit'
66 au Filetype c,cpp,objc map <buffer> <F12> :call FSvsplit()<CR>
67 " Terminal-based vi report S-F12 as F24
68 au Filetype c,cpp,objc map <buffer> <S-F12> :FSHere<CR>
69 au Filetype c,cpp,objc map <buffer> <F24> :FSHere<CR>
71 au Filetype markdown map <buffer> <F5> :call RunMarkdown()<CR>
72 au Filetype asciidoc,asciidoctor map <buffer> <F5> :call RunAsciidoc()<CR>
74 " See https://github.com/artur-shaik/vim-Javacomplete2
76 au FileType java nmap <F4> <Plug>(JavaComplete-Imports-AddSmart)
77 au FileType java imap <F4> <Plug>(JavaComplete-Imports-AddSmart)
79 au FileType java nmap <F5> <Plug>(JavaComplete-Imports-Add)
80 au FileType java imap <F5> <Plug>(JavaComplete-Imports-Add)
82 au FileType java nmap <F6> <Plug>(JavaComplete-Imports-AddMissing)
83 au FileType java imap <F6> <Plug>(JavaComplete-Imports-AddMissing)
85 au FileType java nmap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
86 au FileType java imap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
89 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
90 " Some plugin-specific settings
94 if filereadable($HOME . '/.vim/keymaps-local.vim')
95 source ~/.vim/keymaps-local.vim