Fix hasktags and hscope
This commit is contained in:
parent
6fb310f1f4
commit
9347f35352
@ -7,7 +7,38 @@ syntax on
|
||||
filetype plugin indent on
|
||||
|
||||
|
||||
call CmdAlias('hasktags', '!/home/jule/.cabal/bin/hasktags -c .<CR>')
|
||||
" tags
|
||||
call CmdAlias('hasktags', '!hasktags -c .<CR>')
|
||||
|
||||
" from
|
||||
" https://raw.githubusercontent.com/begriffs/haskell-vim-now/master/git-hscope
|
||||
call CmdAlias('codex', 'call system("haskell-ctags")<CR><CR>call LoadHscope()<CR>')
|
||||
|
||||
|
||||
map <leader>tg :codex<CR>
|
||||
set tags=tags;/,codex.tags;/
|
||||
|
||||
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>
|
||||
|
||||
set cscopeprg=do_at_stack_root\ hscope
|
||||
set csre
|
||||
set csto=1 " search codex tags first
|
||||
set nocst
|
||||
" set cscopequickfix=s-,c-,d-,i-,t-,e-,a-
|
||||
|
||||
function! LoadHscope()
|
||||
set nocscopeverbose " suppress 'duplicate connection' error
|
||||
let hsf = findfile("hscope.out", ".;")
|
||||
if filereadable(hsf)
|
||||
exe "cs add " . hsf
|
||||
elseif $HSCOPE_DB != ""
|
||||
cs add $HSCOPE_DB
|
||||
endif
|
||||
set cscopeverbose
|
||||
endfunction
|
||||
au BufEnter /*.hs call LoadHscope()
|
||||
|
||||
|
||||
" haskell-vim
|
||||
|
Loading…
Reference in New Issue
Block a user