diff options
author | Andrew Gerrand <adg@golang.org> | 2013-11-29 07:04:23 +1100 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2013-11-29 07:04:23 +1100 |
commit | a04e34923c06b0f94b54561bac68a024cc37a754 (patch) | |
tree | 90d4c40dae28c718cd9dda27bc4d490fef99101b | |
parent | e9dc28b0de59ea8ed5e954becbf20f47e67bce07 (diff) | |
download | go-a04e34923c06b0f94b54561bac68a024cc37a754.tar.gz go-a04e34923c06b0f94b54561bac68a024cc37a754.zip |
[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 #6826.
R=golang-dev, bradfitz, adg
CC=golang-dev
https://golang.org/cl/31770043
»»»
R=golang-dev
CC=golang-dev
https://golang.org/cl/34960043
-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 a394cec5a9..b8469f9275 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 ----------------------- |