diff options
author | Teddy Wing | 2015-11-23 17:34:55 -0500 |
---|---|---|
committer | Teddy Wing | 2015-11-23 17:34:55 -0500 |
commit | 413109380075f9bb82e227a3b6a72591ade5c07e (patch) | |
tree | 06357bd454efe737ae1704e328fee5376366d9fc | |
parent | 52b06b3938776ad304043221572497e9368e40b6 (diff) | |
download | dotvim-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.vim | 3 |
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 |