]> Cypherpunks repositories - gostls13.git/commitdiff
misc/vim/readme.txt: workaround weird OS X vim bug.
authorShenghou Ma <minux.ma@gmail.com>
Mon, 28 Apr 2014 18:24:14 +0000 (14:24 -0400)
committerShenghou Ma <minux.ma@gmail.com>
Mon, 28 Apr 2014 18:24:14 +0000 (14:24 -0400)
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 #7865.

LGTM=robert.hencke, dsymonds
R=golang-codereviews, robert.hencke, gobot, dsymonds
CC=golang-codereviews
https://golang.org/cl/96800046

misc/vim/readme.txt

index b8469f92750d2c4b3275399c9c1fe3405eb8b180..9a9e228709a9ae02a6aac4eec0bb98fa15d8f297 100644 (file)
@@ -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