comparison vimrc @ 246:624d06dcf54c

Change mapping for Ag
author zegervdv <zegervdv@me.com>
date Sun, 22 Feb 2015 22:26:26 +0100
parents 50379acb4815
children 5199030e3e2c
comparison
equal deleted inserted replaced
245:ca66a7fd5cc9 246:624d06dcf54c
344 344
345 " Filetype specific settings 345 " Filetype specific settings
346 " Latex {{{ 346 " Latex {{{
347 " Open pdf 347 " Open pdf
348 nnoremap <leader>v :!open -a /Applications/TeX/TeXShop.app %:r.pdf<CR><CR> 348 nnoremap <leader>v :!open -a /Applications/TeX/TeXShop.app %:r.pdf<CR><CR>
349 " Set compiler to rubber
350 autocmd FileType tex setlocal makeprg=latexmk\ -pdf\ %:r 349 autocmd FileType tex setlocal makeprg=latexmk\ -pdf\ %:r
351 au BufNewFile,BufRead,BufEnter *.tex setlocal spell spelllang=en_gb 350 au BufNewFile,BufRead,BufEnter *.tex setlocal spell spelllang=en_gb
352 au BufNewFile,BufRead,BufEnter *.tex setlocal textwidth=0 351 au BufNewFile,BufRead,BufEnter *.tex setlocal textwidth=0
353 " }}} 352 " }}}
354 " Markdown {{{ 353 " Markdown {{{
448 " Swoop {{{ 447 " Swoop {{{
449 let g:swoopUseDefaultKeyMap = 0 448 let g:swoopUseDefaultKeyMap = 0
450 " }}} 449 " }}}
451 " Ag {{{ 450 " Ag {{{
452 " Ack motions by Steve Losh, adapted for Ag 451 " Ack motions by Steve Losh, adapted for Ag
453 nnoremap <silent> \a :set opfunc=<SID>AckMotion<CR>g@ 452 nnoremap <silent> <Leader>a :set opfunc=<SID>AckMotion<CR>g@
454 xnoremap <silent> \a :<C-U>call <SID>AckMotion(visualmode())<CR> 453 xnoremap <silent> <Leader>a :<C-U>call <SID>AckMotion(visualmode())<CR>
455 454
456 function! s:CopyMotionForType(type) 455 function! s:CopyMotionForType(type)
457 if a:type ==# 'v' 456 if a:type ==# 'v'
458 silent execute "normal! `<" . a:type . "`>y" 457 silent execute "normal! `<" . a:type . "`>y"
459 elseif a:type ==# 'char' 458 elseif a:type ==# 'char'