diff options
Diffstat (limited to 'misc/vim/readme.txt')
| -rw-r--r-- | misc/vim/readme.txt | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/misc/vim/readme.txt b/misc/vim/readme.txt index 3c3255113..fe15da993 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 @@ -48,3 +62,15 @@ To install automatic indentation for Go: 3. Add the following line to your .vimrc file (normally $HOME/.vimrc): filetype indent on + + +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, + ftplugin/go/godoc.vim to $HOME/.vim/ftplugin/go/godoc.vim. + and autoload/go/complete.vim to $HOME/.vim/autoload/go/complete.vim. |
