diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-08-24 13:23:15 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-08-24 13:23:15 +0200 |
| commit | 0b48c8ae1c27bfcc1f5b3f611e64f47321cd18c6 (patch) | |
| tree | 107ba5c251175c7ce0d07eeb4748967510c548e2 /misc/vim/readme.txt | |
| parent | 825e92f34920934f09dbf4c614dbd2913ba464cb (diff) | |
| download | golang-0b48c8ae1c27bfcc1f5b3f611e64f47321cd18c6.tar.gz | |
Imported Upstream version 2011.08.17
Diffstat (limited to 'misc/vim/readme.txt')
| -rw-r--r-- | misc/vim/readme.txt | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/misc/vim/readme.txt b/misc/vim/readme.txt index e6bdf0e11..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 @@ -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. |
