summaryrefslogtreecommitdiff
path: root/lib/vimrc
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-06-18 14:55:51 -0700
committerBen Sima <ben@bsima.me>2020-06-18 14:55:51 -0700
commit22b5d8088eb955a3f7373cb29fb3fdbc25c27401 (patch)
tree881e86ec0f2ec9592c80e6eb2534fad18c06e17e /lib/vimrc
parentb05aea790c1240a7432d712efc5977dec2b75c93 (diff)
vim: format haskell code
Diffstat (limited to 'lib/vimrc')
-rw-r--r--lib/vimrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/vimrc b/lib/vimrc
index 8dacb0a..99d006d 100644
--- a/lib/vimrc
+++ b/lib/vimrc
@@ -58,6 +58,9 @@ nmap <silent> ,D :r !date +\%Y.\%m.\%d..\%H.\%M.\%S<cr>
" grep (ripgrep)
nmap ,g :Rg
+" format haskell code
+nmap ,f :!ormolu -m inplace %<cr>
+
" clear out trailing whitespace and lines ending in whitespace
nmap <silent> ,w :%s/[\t ]\+$//e<cr>