|
| 1 | +" CtrlP search |
| 2 | +call unite#filters#matcher_default#use(['matcher_fuzzy']) |
| 3 | +nnoremap <C-p> :Unite -start-insert -winheight=10 file_rec/async<cr> |
| 4 | +nnoremap <C-m> :Unite -start-insert -winheight=10 file_mru<cr> |
| 5 | +
|
| 6 | +" Buffer nav |
| 7 | +nnoremap <Leader>b :Unite -start-insert -winheight=10 buffer<cr> |
| 8 | +
|
| 9 | +" Unite on the bottom |
| 10 | +let g:unite_split_rule = 'botright' |
| 11 | + |
| 12 | +" Grep |
| 13 | +nnoremap <Leader>f :Unite grep:.<cr> |
| 14 | +
|
| 15 | +" Yank history |
| 16 | +let g:unite_source_history_yank_enable = 1 |
| 17 | +nnoremap <Leader>y :Unite history/yank<cr> |
| 18 | +
|
| 19 | +" Bookmark a file for Unite |
| 20 | +noremap <Leader>bb :UniteBookmarkAdd<cr> |
| 21 | +noremap <C-b> :Unite -start-insert -winheight=10 bookmark<cr> |
| 22 | +
|
| 23 | +" Nerdtree |
| 24 | +noremap <Leader>n :NERDTreeToggle<cr> |
| 25 | +
|
| 26 | +" paste toggle |
| 27 | +noremap <F2> :set paste!<cr> |
| 28 | +
|
| 29 | +" change pwd |
| 30 | +noremap <Leader>cd :lcd %:p:h<cr>:pwd<CR> |
| 31 | +
|
| 32 | + |
| 33 | + |
| 34 | +" Window Navigation ------------------------------------------------------------ |
| 35 | +" Use ctrl+(h|j|k|j) to move through open windows. |
| 36 | +map <C-h> <C-w>h |
| 37 | +map <C-j> <C-w>j |
| 38 | +map <C-k> <C-w>k |
| 39 | +map <C-l> <C-w>l |
| 40 | +
|
| 41 | +" Remote search highlighting |
| 42 | +map <silent><Leader>/ :nohls<CR> " Clear search |
| 43 | +
|
| 44 | +" Disable cursor keys |
| 45 | +inoremap <Up> <Nop> |
| 46 | +inoremap <Down> <Nop> |
| 47 | +inoremap <Left> <Nop> |
| 48 | +inoremap <Right> <Nop> |
| 49 | +inoremap <Up> <Nop> |
| 50 | +inoremap <M-Down> <Nop> |
| 51 | +inoremap <M-Left> <Nop> |
| 52 | +inoremap <M-Right> <Nop> |
| 53 | +noremap <Up> <Esc> |
| 54 | +noremap <Down> <Esc> |
| 55 | +noremap <Left> <Esc> |
| 56 | +noremap <Right> <Esc> |
| 57 | +vmap <Up> <Esc><Esc>gv |
| 58 | +vmap <Down> <Esc><Esc>gv |
| 59 | +vmap <Left> <Esc><Esc>gv |
| 60 | +vmap <Right> <Esc><Esc>gv |
| 61 | +
|
| 62 | +" Use <leader>tw to toggle wrapping |
| 63 | +nmap <silent> <leader>tw :set invwrap<CR>:set wrap?<CR> |
| 64 | +
|
| 65 | +" testing |
| 66 | +map <Leader>r :call RunCurrentTest()<CR> |
| 67 | +map <Leader>R :call RunCurrentLineInTest()<CR> |
| 68 | +map <Leader>p :call RunCurrentLineInTest()<CR> |
0 commit comments