pax_global_header00006660000000000000000000000064121724463400014515gustar00rootroot0000000000000052 comment=1368a694345f35c62b1e5a2cd948073b67d796c5 gocode-0~git20130712/000077500000000000000000000000001217244634000142005ustar00rootroot00000000000000gocode-0~git20130712/.gitignore000066400000000000000000000001251217244634000161660ustar00rootroot00000000000000*.8 *.a *.out gocode goremote gocodetest *.swp listidents showcursor showsmap rename gocode-0~git20130712/LICENSE000066400000000000000000000020611217244634000152040ustar00rootroot00000000000000Copyright (C) 2010 nsf Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. gocode-0~git20130712/README.md000066400000000000000000000115371217244634000154660ustar00rootroot00000000000000## An autocompletion daemon for the Go programming language Gocode is a helper tool which is intended to be integrated with your source code editor, like vim and emacs. It provides several advanced capabilities, which currently includes: - Context-sensitive autocompletion It is called *daemon*, because it uses client/server architecture for caching purposes. In particular, it makes autocompletions very fast. Typical autocompletion time with warm cache is 30ms, which is barely noticeable. Also watch the [demo screencast](http://nosmileface.ru/images/gocode-demo.swf). ![Gocode in vim](http://nosmileface.ru/images/gocode-screenshot.png) ![Gocode in emacs](http://nosmileface.ru/images/emacs-gocode.png) ### Setup 1. You should have a correctly installed Go compiler environment and your personal workspace ($GOPATH). If you have no idea what **$GOPATH** is, take a look [here](http://golang.org/doc/code.html). Please make sure that your **$GOPATH/bin** is available in your **$PATH**. This is important, because most editors assume that **gocode** binary is available in one of the directories, specified by your **$PATH** environment variable. Otherwise manually copy the **gocode** binary from **$GOPATH/bin** to a location which is part of your **$PATH** after getting it in step 2. Do these steps only if you know why do you need them: `export GOPATH=$HOME/goprojects` `export PATH=$PATH:$GOPATH/bin` 2. Then you need to get the appropriate version of the gocode, for 6g/8g/5g compiler you can do this: `go get -u github.com/nsf/gocode` (-u flag for "update") Windows users should consider doing this instead: `go get -u -ldflags -H=windowsgui github.com/nsf/gocode` That way on the Windows OS gocode will be built as a GUI application and doing so solves hanging window issues with some of the editors. 3. Next steps are editor specific. See below. ### Vim setup In order to install vim scripts, you need to fulfill the following steps: 1. Install official Go vim scripts from **$GOROOT/misc/vim**. If you did that already, proceed to the step 2. 2. Install gocode vim scripts. Usually it's enough to do the following: `vim/update.sh` **update.sh** script does the following: #!/bin/sh mkdir -p "$HOME/.vim/autoload" mkdir -p "$HOME/.vim/ftplugin" cp "${0%/*}/autoload/gocomplete.vim" "$HOME/.vim/autoload" cp "${0%/*}/ftplugin/go.vim" "$HOME/.vim/ftplugin" 3. Make sure vim has filetype plugin enabled. Simply add that to your **.vimrc**: `filetype plugin on` 4. Autocompletion should work now. Use `` for autocompletion (omnifunc autocompletion). Alternatively take a look at the vundle/pathogen friendly repo: https://github.com/Blackrush/vim-gocode. ### Emacs setup In order to install emacs script, you need to fulfill the following steps: 1. Install [auto-complete-mode](http://www.emacswiki.org/emacs/AutoComplete) 2. Copy **emacs/go-autocomplete.el** file from the gocode source distribution to a directory which is in your 'load-path' in emacs. 3. Add these lines to your **.emacs**: (require 'go-autocomplete) (require 'auto-complete-config) Also, there is an alternative plugin for emacs using company-mode. See `emacs-company/README` for installation instructions. ### Options You can change all available options using `gocode set` command. The config file uses .ini-like format and usually stored somewhere in **~/.config/gocode** directory. `gocode set` lists all options and their values. `gocode set