]> git.sthu.org Git - vimconf.git/blob - keymaps.vim
plugins: Replace vim-css-color by vim-coloresque
[vimconf.git] / keymaps.vim
1 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
2 " Global settings
3
4 nnoremap <C-p> :Denite file/rec<cr>
5 nnoremap <space>/ :Denite grep:.<cr>
6 nnoremap <space>s :Denite buffer<cr>
7
8 nnoremap <C-space> pumvisible() ? "\<c-n>" : "\<tab>"
9
10 nnoremap <F2> :NERDTreeToggle<cr>
11 nnoremap <F3> :TagbarToggle<cr>
12
13 nmap <s-PageDown> :bn<CR>
14 nmap <s-PageUp> :bp<CR>
15
16 map <a-c> <plug>NERDCommenterToggle
17
18 imap <C-k> <Plug>(neosnippet_expand_or_jump)
19 smap <C-k> <Plug>(neosnippet_expand_or_jump)
20 xmap <C-k> <Plug>(neosnippet_expand_target)
21
22 " Start interactive EasyAlign in visual mode (e.g. vipga)
23 vmap <Enter> <Plug>(EasyAlign)
24 " Start interactive EasyAlign for a motion/text object (e.g. gaip)
25 nmap ga <Plug>(EasyAlign)
26
27
28 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
29 " Some filetype-specific settings
30
31 au Filetype gnuplot map <buffer> <F5> :call OpenIn("gnuplot -persist") <CR>
32
33 au Filetype c,cpp,objc map <buffer> <F11> :vsplit<CR>:FSRight<CR>
34 au Filetype c,cpp,objc map <buffer> <S-F11> :FSHere<CR>
35
36 au Filetype markdown map <buffer> <F5> :call RunMarkdown()<CR>
37 au Filetype asciidoc map <buffer> <F5> :call RunAsciidoc()<CR>
38
39 " See https://github.com/artur-shaik/vim-Javacomplete2
40 " <C-j>ji <leader>ji
41 au FileType java nmap <F4> <Plug>(JavaComplete-Imports-AddSmart)
42 au FileType java imap <F4> <Plug>(JavaComplete-Imports-AddSmart)
43 " <C-j>ii <leader>jii
44 au FileType java nmap <F5> <Plug>(JavaComplete-Imports-Add)
45 au FileType java imap <F5> <Plug>(JavaComplete-Imports-Add)
46 " <C-j>I <leader>jI
47 au FileType java nmap <F6> <Plug>(JavaComplete-Imports-AddMissing)
48 au FileType java imap <F6> <Plug>(JavaComplete-Imports-AddMissing)
49 " <C-j>R <leader>jR
50 au FileType java nmap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
51 au FileType java imap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
52
53
54 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
55 " Some plugin-specific settings
56
57
58
59
60 if filereadable($HOME . '/.vim/keymaps-local.vim')
61 source ~/.vim/keymaps-local.vim
62 endif