Compare commits
2 Commits
77a5eb5742
...
275a07bf4e
Author | SHA1 | Date |
---|---|---|
Julian Ospald | 275a07bf4e | |
Julian Ospald | 3adeb5e04e |
|
@ -15,10 +15,12 @@ call CmdAlias('hasktags', '!hasktags -c .<CR>')
|
|||
call CmdAlias('codex', 'call system("haskell-ctags")<CR><CR>call LoadHscope()<CR>')
|
||||
|
||||
|
||||
map <leader>tg :codex<CR>
|
||||
map <leader>ctg :codex<CR>
|
||||
set tags=tags;/,codex.tags;/
|
||||
|
||||
" classic ctags jump
|
||||
nnoremap <leader>gd <C-]>
|
||||
|
||||
nnoremap <silent> <leader>cgd :cs find g <C-R>=expand("<cword>")<CR><CR>
|
||||
nnoremap <silent> <C-\> :cs find c <C-R>=expand("<cword>")<CR><CR>
|
||||
|
||||
|
|
|
@ -153,3 +153,8 @@ inoremap <C-V> <C-O>:call Paste("i")<CR>
|
|||
" select all
|
||||
nnoremap <C-A> ggVG<CR>
|
||||
inoremap <C-A> <C-O>:call Select()<CR>
|
||||
|
||||
" fzf
|
||||
nnoremap <leader>ag :call fzf#vim#ag(expand('<cword>'), WithGitRoot())<CR>
|
||||
nnoremap <leader>tg :call fzf#vim#tags(expand('<cword>'), {'options': '--exact --select-1 --exit-0'})<CR>
|
||||
|
||||
|
|
10
vimrc
10
vimrc
|
@ -272,12 +272,14 @@ let g:ctrlp_match_func = { 'match': 'cpsm#CtrlPMatch' }
|
|||
" --color: Search color options
|
||||
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>), 1, <bang>0)
|
||||
|
||||
function! s:with_git_root()
|
||||
let root = systemlist('git rev-parse --show-toplevel')[0]
|
||||
return v:shell_error ? {} : {'dir': root}
|
||||
function! WithGitRoot()
|
||||
let groot = systemlist('git -C ' . expand('%:p:h') . ' rev-parse --show-toplevel')[0]
|
||||
return v:shell_error ? {} : {'dir': groot}
|
||||
endfunction
|
||||
|
||||
command! -bang -nargs=* Rag call fzf#vim#ag_raw(<q-args>, s:with_git_root())
|
||||
command! -nargs=* Rag
|
||||
\ call fzf#vim#ag(<q-args>, WithGitRoot())
|
||||
|
||||
|
||||
" ==== conque ====
|
||||
" command aliases
|
||||
|
|
Loading…
Reference in New Issue