Commit b067fb26 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Tighten up some custom vim-mappings

parent 15023a27
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -31,16 +31,16 @@ noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-w>l
noremap <A-h> gT
noremap <A-j> :CtrlSpaceGoDown<CR>
noremap <A-k> :CtrlSpaceGoUp<CR>
noremap <silent> <A-j> :CtrlSpaceGoDown<CR>
noremap <silent> <A-k> :CtrlSpaceGoUp<CR>
noremap <A-l> gt
noremap! <C-h> <Esc><C-w>h
noremap! <C-j> <Esc><C-w>j
noremap! <C-k> <Esc><C-w>k
noremap! <C-l> <Esc><C-w>l
noremap! <A-h> <Esc>gT
noremap! <A-j> <Esc>:CtrlSpaceGoDown<CR>
noremap! <A-k> <Esc>:CtrlSpaceGoUp<CR>
noremap! <silent> <A-j> <Esc>:CtrlSpaceGoDown<CR>
noremap! <silent> <A-k> <Esc>:CtrlSpaceGoUp<CR>
noremap! <A-l> <Esc>gt
if exists(':tnoremap')
	tnoremap <C-h> <C-\><C-n><C-w>h
@@ -117,7 +117,8 @@ let g:ycm_autoclose_preview_window_after_completion=1
set listchars-=tab:•◦
set listchars+=tab:•◦

" Call invlist with 'tl'
" Call invlist with '<Leader>i' or 'tl' (deprecated)
nmap <silent> <Leader>i :set invlist<CR>
nmap <silent> tl :set invlist<CR>


@@ -144,14 +145,15 @@ if exists('TermOpen')
	au TermOpen * match none
endif

" Toggle search high-lighting with 'th'
" Toggle search high-lighting with '<Leader>h' or 'th' (deprecated)
nmap <silent> <Leader>h :set hlsearch!<CR>
nmap <silent> th :set hlsearch!<CR>


" === GREPPING ===

noremap S :AsyncRun -program=grep '\b<cword>\b'<CR>
vnoremap S ""y:AsyncRun -program=grep '\b<C-R>"\b'<CR>
noremap <silent> S :AsyncRun -program=grep '\b<cword>\b'<CR>
vnoremap <silent> S ""y:AsyncRun -program=grep '\b<C-R>"\b'<CR>
let s:grepargs='-n --binary-files=without-match'
if executable("list-files")
	let &grepprg = 'list-files -z | xargs -r0 grep ' . s:grepargs
@@ -162,7 +164,7 @@ endif

" === AUTO QUICKFIX ===

noremap <F9> :call asyncrun#quickfix_toggle(8)<CR>
noremap <silent> <F9> :call asyncrun#quickfix_toggle(8)<CR>
augroup vimrc
	autocmd QuickFixCmdPost * call asyncrun#quickfix_toggle(8, 1)
augroup END