/
vimrc.haskell
47 lines (38 loc) · 1.84 KB
/
vimrc.haskell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
" haskell: cabal install hdevtools
Bundle "bitc/vim-hdevtools.git"
"Bundle "dag/vim2hs.git"
" quite many features
"Bundle "travitch/hasksyn.git"
" fast and new
"Bundle "vim-scripts/indenthaskell.vim.git"
" " used with haskellmode-vim
"Bundle "lukerandall/haskellmode-vim.git"
" " old-n-bad
Bundle "raichoo/haskell-vim.git"
augroup filetype
au BufRead,BufNewFile *.hsc setlocal filetype=haskell
au FileType haskell setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
au FileType cabal setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
au FileType haskell nnoremap <buffer> ;t :HdevtoolsType<CR>
au FileType haskell nnoremap <buffer> ;i :HdevtoolsInfo<CR>
au FileType haskell nnoremap <buffer> <silent> ;c :HdevtoolsClear<CR>
au FileType haskell nnoremap <buffer> <silent> ;<Space> :HdevtoolsClear<CR>
au FileType haskell map K :!open 'http://haskell.org/hoogle/?hoogle='<cword><CR><CR>
augroup END
let hs_highlight_delimiters=1
let hs_highlight_boolean=1
let hs_highlight_types=1
let hs_allow_hash_operator=1
let g:haskell_indent_if=4
let g:haskell_indent_case=4
let g:haddock_browser="open"
function! FindCabalSandboxRoot()
return finddir('.cabal-sandbox', './;')
endfunction
function! FindCabalSandboxRootPackageConf()
return get(split(glob(FindCabalSandboxRoot().'/*-packages.conf.d'), '\n'), -1, '')
endfunction
"let g:syntastic_haskell_hdevtools_args = '-g -ilib -g -itest -g -isrc -g -i. -g -idist/build/autogen -g -no-user-package-db -g -package-conf='.FindCabalSandboxRootPackageConf()
"let g:hdevtools_options = '-g -ilib -g -itest -g -isrc -g -i. -g -idist/build/autogen -g -no-user-package-db -g -package-conf='.FindCabalSandboxRootPackageConf()
" let g:hdevtools_options = '-g -ilib -g -itest -g -isrc -g -i. -g -idist/build/autogen -g -Wall '
"let g:hdevtools_options = '-g -ilib -g -itest -g -isrc -g -i. -g -idist/build/autogen'