summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2013-11-29 07:04:23 +1100
committerAndrew Gerrand <adg@golang.org>2013-11-29 07:04:23 +1100
commita7eea2e769be48575c7810106fbcdce2178b50c8 (patch)
tree53dd0f55cb174ac6a6e2c40b41d2fc2f4057e440
parent67d6efcae6f18e2f634b36420237780b86f3cbb3 (diff)
downloadgo-a7eea2e769be48575c7810106fbcdce2178b50c8.tar.gz
[release-branch.go1.2] misc/vim: describe how to get gofmt-on-save behaviour.
??? CL 31770043 / 286f0ddb799b 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 ??? R=golang-dev CC=golang-dev https://codereview.appspot.com/34960043
-rw-r--r--misc/vim/readme.txt5
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
-----------------------