Created
October 15, 2011 09:59
-
-
Save lbolla/1289349 to your computer and use it in GitHub Desktop.
Haskell VIM files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Add to .vimrc | |
" Need to have .vim/compiler/ghc.vim | |
augroup HSK | |
au Bufenter *.hs compiler ghc | |
autocmd FileType haskell setlocal formatoptions+=t | |
autocmd FileType haskell let b:ghc_staticoptions = '-Wall -Werror' | |
augroup END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Add to .vim/ftplugin/haskell.vim | |
" From Good Haskell Style http://urchin.earth.li/~ian/style/haskell.html | |
setlocal expandtab | |
setlocal tabstop=8 | |
setlocal shiftwidth=8 | |
setlocal textwidth=79 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Add to .vim/syntax/haskell.vim | |
" From Good Haskell Style http://urchin.earth.li/~ian/style/haskell.html | |
syn cluster hsRegions add=hsImport,hsLineComment,hsBlockComment,hsPragma | |
syn cluster hsRegions add=cPreCondit,cCppOut,cCppOut2,cCppSkip | |
syn cluster hsRegions add=cIncluded,cDefine,cPreProc,cComment,cCppString | |
syn match tab display "\t" containedin=@hsRegions | |
hi link tab Error | |
syn match trailingWhite display "[[:space:]]\+$" containedin=@hsRegions | |
hi link trailingWhite Error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment