aboutsummaryrefslogtreecommitdiff
path: root/misc/vim/readme.txt
diff options
context:
space:
mode:
Diffstat (limited to 'misc/vim/readme.txt')
-rw-r--r--misc/vim/readme.txt35
1 files changed, 25 insertions, 10 deletions
diff --git a/misc/vim/readme.txt b/misc/vim/readme.txt
index e6bdf0e116..fe15da9935 100644
--- a/misc/vim/readme.txt
+++ b/misc/vim/readme.txt
@@ -1,5 +1,17 @@
-Vim syntax highlighting for Go (http://golang.org)
-==================================================
+Vim plugins for Go (http://golang.org)
+======================================
+
+To use all the Vim plugins, add these lines to your vimrc.
+
+ set rtp+=$GOROOT/misc/vim
+ filetype plugin indent on
+ syntax on
+
+If you want to select fewer plugins, use the instructions in the rest of
+this file.
+
+Vim syntax highlighting
+-----------------------
To install automatic syntax highlighting for GO programs:
@@ -18,15 +30,17 @@ commands:
mkdir -p $HOME/.vim/ftdetect
mkdir -p $HOME/.vim/syntax
+ mkdir -p $HOME/.vim/autoload/go
ln -s $GOROOT/misc/vim/ftdetect/gofiletype.vim $HOME/.vim/ftdetect/
ln -s $GOROOT/misc/vim/syntax/go.vim $HOME/.vim/syntax
+ ln -s $GOROOT/misc/vim/autoload/go/complete.vim $HOME/.vim/autoload/go
echo "syntax on" >> $HOME/.vimrc
-Vim filetype plugins for Go
-===========================
+Vim filetype plugins
+--------------------
-To install one of the available filetype plugins for Go:
+To install one of the available filetype plugins:
1. Same as 1 above.
2. Copy or link one or more plugins from ftplugin/go/*.vim to the
@@ -37,10 +51,10 @@ To install one of the available filetype plugins for Go:
filetype plugin on
-Vim indentation plugin for Go
-=============================
+Vim indentation plugin
+----------------------
-To install automatic indentation for Go:
+To install automatic indentation:
1. Same as 1 above.
2. Copy or link indent/go.vim to the indent directory underneath your vim
@@ -51,11 +65,12 @@ To install automatic indentation for Go:
Godoc plugin
-============
+------------
To install godoc plugin:
1. Same as 1 above.
2. Copy or link plugin/godoc.vim to $HOME/.vim/plugin/godoc,
syntax/godoc.vim to $HOME/.vim/syntax/godoc.vim,
- and ftplugin/go/godoc.vim to $HOME/.vim/ftplugin/go/godoc.vim.
+ ftplugin/go/godoc.vim to $HOME/.vim/ftplugin/go/godoc.vim.
+ and autoload/go/complete.vim to $HOME/.vim/autoload/go/complete.vim.