From 74eb115b1c7a5b91e6b40d0c6ce78a81d011f6b9 Mon Sep 17 00:00:00 2001 From: David Symonds Date: Mon, 25 Nov 2013 11:03:47 +1100 Subject: [PATCH] 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 --- 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 ----------------------- -- 2.50.0