diff options
author | David Symonds <dsymonds@golang.org> | 2013-11-25 11:03:47 +1100 |
---|---|---|
committer | David Symonds <dsymonds@golang.org> | 2013-11-25 11:03:47 +1100 |
commit | eee6dbe18d771b6abc4988a96ea50838ef9be86c (patch) | |
tree | 47f1ec81b61203de0e1d0c6b7fc0f4ea45b30068 /misc | |
parent | 6b25cfdc4504e7498ea229e883a379a0acda1dfa (diff) | |
download | go-eee6dbe18d771b6abc4988a96ea50838ef9be86c.tar.gz |
misc/vim: describe how to get gofmt-on-save behaviour.
Fixes issue 6826.
R=golang-dev, bradfitz, adg
CC=golang-dev
https://codereview.appspot.com/31770043
Diffstat (limited to 'misc')
-rw-r--r-- | misc/vim/readme.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/vim/readme.txt b/misc/vim/readme.txt index a394cec5a..b8469f927 100644 --- a/misc/vim/readme.txt +++ b/misc/vim/readme.txt @@ -14,6 +14,11 @@ To use all the Vim plugins, add these lines to your $HOME/.vimrc. If you want to select fewer plugins, use the instructions in the rest of this file. +A popular configuration is to gofmt Go source files when they are saved. +To do that, add this line to the end of your $HOME/.vimrc. + + autocmd FileType go autocmd BufWritePre <buffer> Fmt + Vim syntax highlighting ----------------------- |