Zeus and gocode Autocomplete

This forum allows you to share scripts with other Zeus users. Please do not post bug reports, feature requests or questions to this forum, but rather use it exclusively for posting scripts or for the discussion of scripts that have been posted.
Post Reply
jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Zeus and gocode Autocomplete

Post by jussij » Tue Jun 19, 2012 7:33 am

Introduction
The latest Zeus release adds support for gocode autocomplete. Here is a link to a video showing the autocomplete in action.

The latest Zeus release can be found here: http://www.zeusedit.com/download.html

This release includes the macros you need to work with the gocode tool.

Macros Included in this Release
go_code.py
go_intellisense.py
go_intellisense_dot.lua
go_intellisense_brace.lua

Macro Setup
1) Use the Options, Editor Options menu.

2) In the Keyboard Mapping section edit the active keyboard and bind the go_intellisense_dot.lua to the '.' (i.e. the period) keyboard character.

3) In the Keyboard Mapping section edit the active keyboard and bind the go_intellisense_brace.lua to the '(' (i.e. the brace) keyboard character.

4) Bind the go_intellisense.py macro to some other keyboard key combination (i.e. Ctrl+Space etc).

How They Work
The go_intellisense.py macro does general autocomplete and can be used for example to autocomplete somthing like this:

Code: Select all

    fmt.Pr|
          ^cursor here and press the Ctrl+Space autocomplete keyboard keys (i.e. step 4)
The go_intellisense_dot.lua macro does auto complete whenever the '.' character is entered, for example:

Code: Select all

   math.
       ^fires on the '.' key press
The go_intellisense_brace.lua macro does auto complete whenever the '(' character is entered, for example:

Code: Select all

   math.Abs(
           ^fires on the '(' key press
Other Go Language Topics
Setting up the Go compiler
Go Auto-formatting on Save (using goimports)

Cheers Jussi

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 2 guests