Philip Xu avatar Philip Xu committed 1e2541c

updated vimrc.

Comments (0)

Files changed (1)

config/vim/.vimrc

   augroup haskell_support
     au!
     " set compiler, then restore 'cmdheight' back to 1
-    autocmd BufEnter *.hs compiler ghc | set cmdheight=1
+    autocmd BufEnter *.hs,*.lhs compiler ghc | set cmdheight=1
+    " changed maplocalleader when editing haskell.
+    " due to implementation details of vim-haskellmode, it is too later if we
+    " set maplocalleader with 'autocmd FileType haskell', so ':setf haskell'
+    " in a newly created unnamed buffer will not get vim-haskellmode hotkeys
+    " set properly.
+    " to avoid this, either hack vim-haskellmode's code or set maplocalleader
+    " globally.
+    autocmd BufReadPre,BufNew,BufNewFile *.hs,*.lhs :let maplocalleader=","
 
   " py.test Support ----------------------------------- {{{2
   augroup pytest
 " https://github.com/Twinside/vim-haskellConceal
 " #git clone git://github.com/Twinside/vim-haskellConceal.git
 
-" Haskell Conceal ------------------------------------- {{{2
+" Haskell Mode ---------------------------------------- {{{2
 " http://projects.haskell.org/haskellmode-vim/
 " installed from gentoo haskell overlay
-let g:haddock_browser = '/usr/bin/firefox'
+let g:haddock_browser = '/usr/bin/firefox-bin'
 
 " Indent Guides --------------------------------------- {{{2
 " http://www.vim.org/scripts/script.php?script_id=3361
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.