Go plugin for gedit: go-gedit-plugin

313 views
Skip to first unread message

fzzbt

unread,
Jan 13, 2011, 12:03:05 PM1/13/11
to golang-nuts
I have developed a Go plugin for gedit editor.
I thought I'll announce this here in case someone finds it useful.
It's my first gedit plugin so bugs may still exist, but it works well
for me at least.
Any feedback is welcome.

Current features:
* Code completion (gocode)
* Autoformatting (gofmt)
* Shortcuts for toggling comments

Info:
https://bitbucket.org/fuzzybyte/go-gedit-plugin/src

Download:
https://bitbucket.org/fuzzybyte/go-gedit-plugin/downloads

jimt

unread,
Jan 13, 2011, 7:47:40 PM1/13/11
to golan...@googlegroups.com
Excellent work, sir.

It is working nicely. I would however remark that enabling gofmt on file-save, causes the text-field to scroll up and down very quickly, creating a bit of a jittery feel. It also undoes any text-selection I may have at the time I hit save. Not sure if this can be avoided. Just letting you know :)

If possible, I would also suggest a different key combination to enable code completion.  Ctrl-J requires considerable effort to type with my not-so-nimble fingers. Perhaps a single key, or the possibility to let me choose my own keybinding? Other than that, it's a welcome addition. Thanks!


Seth Hoenig

unread,
Jan 14, 2011, 11:53:02 AM1/14/11
to golang-nuts
What are the shortcuts for toggling comments? Gedit already supports
Ctrl+m for commenting and Ctrl+Shift+m for uncommenting.

This plugin is awesome, but I agree with jimt, something easier to
reach than Ctrl+j would be nice for auto-completion. In my perfect
world I would re-map Ctrl+d (delete line) to Ctrl+q (who needs a
shortcut to quit anyway?) and then put auto-complete on Ctrl-d.

And thanks for this, it makes my favorite editor that much better!

jimt

unread,
Jan 14, 2011, 12:24:04 PM1/14/11
to golan...@googlegroups.com
I edited the plugin source and mapped the auto-completion to alt-z. Would be nice if this can eventually be done in the plugin config, but for now this works as well. You can change the value in go-gedit-plugin/window.py at line 124.

Alt-z is not ideal, but the key I had in mind was already used by Gedit somewhere else. This causes the plugin to simply not work. Alt-z is close together and easy to reach, for me at least.

bflm

unread,
Jan 14, 2011, 12:35:02 PM1/14/11
to golang-nuts
On Jan 14, 6:24 pm, jimt <jimteeu...@gmail.com> wrote:
> Alt-z is close
> together and easy to reach, for me at least.
Not on my QWERTZ keyboard :-(

Let me suggest e.g. ctrl-space if that's possible.

dpsc...@gmail.com

unread,
Apr 14, 2012, 4:33:55 PM4/14/12
to golan...@googlegroups.com
Is this still alive? I've just started using Go, and I think this would be quite useful.

nvc...@gmail.com

unread,
Apr 15, 2012, 5:59:31 AM4/15/12
to golan...@googlegroups.com
Here: https://bitbucket.org/fzzbt/go-gedit-plugin/src
the link has change

Vào 03:33:55 UTC+7 Chủ nhật, ngày 15 tháng tư năm 2012, dpsc...@gmail.com đã viết:
Reply all
Reply to author
Forward
0 new messages