aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-11-23 17:34:55 -0500
committerTeddy Wing2015-11-23 17:34:55 -0500
commit413109380075f9bb82e227a3b6a72591ade5c07e (patch)
tree06357bd454efe737ae1704e328fee5376366d9fc
parent52b06b3938776ad304043221572497e9368e40b6 (diff)
downloaddotvim-413109380075f9bb82e227a3b6a72591ade5c07e.tar.bz2
ftplugin/go.vim: Add mapping for `go fmt`
Provide a quick way to format the current file.
-rw-r--r--ftplugin/go.vim3
1 files changed, 3 insertions, 0 deletions
diff --git a/ftplugin/go.vim b/ftplugin/go.vim
index a433d88..fa655bd 100644
--- a/ftplugin/go.vim
+++ b/ftplugin/go.vim
@@ -12,6 +12,9 @@ nnoremap <buffer> <leader>cf :make %<cr>
" Compile & run file
nnoremap <buffer> <leader>cr :!go run %<cr>
+" Format
+nnoremap <buffer> cdf :!go fmt %<cr>
+
" Comment string
setlocal commentstring=//\ %s