Skip to content

Instantly share code, notes, and snippets.

@jamiecook
Created June 17, 2015 14:02
Show Gist options
  • Save jamiecook/1891d7555dac520bb8cb to your computer and use it in GitHub Desktop.
Save jamiecook/1891d7555dac520bb8cb to your computer and use it in GitHub Desktop.
Vim rc to run haskelly stuff
" Ruby
autocmd FileType ruby noremap <leader>r :w<cr>:!ruby % <cr>
" Functional tests
autocmd FileType scala noremap <leader>t :w<cr>:!sbt test<cr>
autocmd FileType haskell noremap <leader>r :w<cr>:!ghc % -o run_me<cr>:!./run_me<cr>
autocmd FileType haskell noremap <leader>t :w<cr>:!doctest %<cr>
autocmd FileType haskell noremap <buffer> <F2> :GhcModType<CR>
autocmd FileType haskell noremap <buffer> <silent> <F3> :GhcModTypeClear<CR>
autocmd FileType haskell noremap <leader>T :w<CR>:GhcModTypeInsert<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment