summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorShenghou Ma <minux.ma@gmail.com>2014-04-28 14:24:14 -0400
committerShenghou Ma <minux.ma@gmail.com>2014-04-28 14:24:14 -0400
commit88b35e1a304a9715bca3427c4e1c4f1b85bda0f1 (patch)
tree798434e6f86d5dfd721ed8f24366e6e0d2fcf02a /misc
parent688fb70ec98cbb64578585b40aca57805d224934 (diff)
downloadgo-88b35e1a304a9715bca3427c4e1c4f1b85bda0f1.tar.gz
misc/vim/readme.txt: workaround weird OS X vim bug.
The vi bundled with OS X has a weird bug in that if you turn off filetype in .vimrc when it's not turned on, even a clean exit of vi will return 1 which breaks almost everything. While we're at it, add hint to change $GOROOT to its actual value in .vimrc. Fixes issue 7865. LGTM=robert.hencke, dsymonds R=golang-codereviews, robert.hencke, gobot, dsymonds CC=golang-codereviews https://codereview.appspot.com/96800046
Diffstat (limited to 'misc')
-rw-r--r--misc/vim/readme.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/misc/vim/readme.txt b/misc/vim/readme.txt
index b8469f927..9a9e22870 100644
--- a/misc/vim/readme.txt
+++ b/misc/vim/readme.txt
@@ -5,9 +5,11 @@ To use all the Vim plugins, add these lines to your $HOME/.vimrc.
" Some Linux distributions set filetype in /etc/vimrc.
" Clear filetype flags before changing runtimepath to force Vim to reload them.
- filetype off
- filetype plugin indent off
- set runtimepath+=$GOROOT/misc/vim
+ if exists("g:did_load_filetypes")
+ filetype off
+ filetype plugin indent off
+ endif
+ set runtimepath+=$GOROOT/misc/vim " replace $GOROOT with the output of: go env GOROOT
filetype plugin indent on
syntax on