From a04e34923c06b0f94b54561bac68a024cc37a754 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Fri, 29 Nov 2013 07:04:23 +1100 Subject: [release-branch.go1.2] misc/vim: describe how to get gofmt-on-save behaviour. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ««« 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 --- misc/vim/readme.txt | 5 +++++ 1 file changed, 5 insertions(+) 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 Fmt + Vim syntax highlighting ----------------------- -- cgit v1.2.3-54-g00ecf