-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc.mappings
77 lines (58 loc) · 1.58 KB
/
.vimrc.mappings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
" Up and down are more logical with g..
nnoremap <silent> k gk
nnoremap <silent> j gj
inoremap <silent> <Up> <Esc>gka
inoremap <silent> <Down> <Esc>gja
" Create Blank Newlines and stay in Normal mode
nnoremap <silent> zj o<Esc>
nnoremap <silent> zk O<Esc>
inoremap <C-c> <Esc>
" tab completion
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
" Search mappings: These will make it so that going to the next one in a
" search will center on the line it's found in.
map N Nzz
map n nzz
" Clear highlighted searches
nmap <silent> <Leader>/ :nohlsearch<CR>
nmap <silent> <Leader>r :redraw!<CR>
" repeat operator in visual mode
vnoremap . :normal .<CR>
" Keep selection after indent
vnoremap > ><CR>gv
vnoremap < <<CR>gv
nnoremap <Leader><Tab> :b#<CR>
"Tagbar
nmap <F8> :TagbarToggle<CR>
"nerdtree
nmap <F9> :NERDTreeTabsToggle <CR>
"FSwitch
nmap <silent> <leader>o :FSHere<CR>
"fzf
nmap <Leader>p :Files<cr>
nmap <Leader>l :BLines<cr>
nmap <Leader>k :BTags<cr>
nmap <Leader>m :Tags<cr>
nmap <Leader>b :Buffers<cr>
nnoremap <Leader>t :Tags <c-r><c-w><cr>
"ag
nmap <space>a :Ag <c-r><c-w>
"tags
nnoremap t g<c-]>
" incsearch
map / <Plug>(incsearch-forward)
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
map n <Plug>(incsearch-nohl-n)
map N <Plug>(incsearch-nohl-N)
map * <Plug>(incsearch-nohl-*)
map # <Plug>(incsearch-nohl-#)
map g* <Plug>(incsearch-nohl-g*)
map g# <Plug>(incsearch-nohl-g#)
"incsearch fuzzy
map z/ <Plug>(incsearch-fuzzy-/)
map z? <Plug>(incsearch-fuzzy-?)
map zg/ <Plug>(incsearch-fuzzy-stay)
"easy-align
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)