Hi Lex,
Sorry for my late reply -- I just turned on Digest mode so it took a while to see your message.
1. I have Geany 1.23, Ubuntu 12.04. Yes, my file is .py I went into Geany and did these extra things: Turn off "Tab key indents" in Indentation, Turn on "Snippet completion" in Completions.
Still, when I hit a tab key, it just inserts white spaces (sometimes 1, sometimes 4/tab).
2. What's the best way to raise interest in a feature like Code minimap? I looked at the Feature Request page on SourceForge and they seem to request mainly support for miscellaneous language. Whereas some of the slick Sublime-like features (minimap, multiple cursors, put both quotes around a highlighted word) would seem to be universally appealing.
Thanks, - Anh
Hi all, I recently stumbled upon Sublime Text 2 and was pretty impressed with its Snippet completion and Code minimap. I'm delighted to find out that Geany has snippet as well, but hitting Tab (my snippet completion keybinding) does not do anything for me... I did reload configuration + close/restart Geany From my snippets.conf
# Optional keybindings to insert snippets # Note: these can be overridden by Geany's configurable keybindings [Keybindings] #for=<Ctrl>7
There is also the appropriate section for Python snippets
[Python] for=for i in xrange(%cursor%):\n\t if=if %cursor%:\n\t elif=elif %cursor%:\n\t else=else:\n\t while=while %cursor%:\n\t try=try:\n\t%cursor%\nexcept Exception, ex:\n\t with=with %cursor%:\n\t def=def %cursor% (%cursor%):\n\t""" Function doc """\n\t class=class %cursor%:\n\t""" Class doc """\n\t\n\tdef __init__ (self):\n\t\t""" Class initialiser """\n\t\tpass
The second issue is that I'm wondering if there's code minimap planned for Geany? I'm surprised that Google only turns up one such request.
Thank you all, Best regards,
- Anh
Message: 2 Date: Sun, 1 Dec 2013 13:01:58 +1100 From: Lex Trotman elextr@gmail.com To: Geany general discussion list users@lists.geany.org Subject: Re: [Geany-Users] Snippet completion not working + is code minimap planned? Message-ID: CAKhWKDNddqYwBybv3FawZWmKUUtq4H-mO0hyO83ogE0vJrfrpw@mail.gmail.com Content-Type: text/plain; charset="iso-8859-1"
On 1 December 2013 11:43, Anh ale@colgate.edu wrote:
Hi all,
I recently stumbled upon Sublime Text 2 and was pretty impressed with its Snippet completion and Code minimap.
I'm delighted to find out that Geany has snippet as well, but hitting Tab (my snippet completion keybinding) does not do anything for me... I did reload configuration + close/restart Geany
What version of Geany? What operating system? So you type for<tab> and nothing happens? Is the window you are in a Python filetype?
From my snippets.conf
# Optional keybindings to insert snippets # Note: these can be overridden by Geany's configurable keybindings [Keybindings] #for=<Ctrl>7
There is also the appropriate section for Python snippets
[Python] for=for i in xrange(%cursor%):\n\t if=if %cursor%:\n\t elif=elif %cursor%:\n\t else=else:\n\t while=while %cursor%:\n\t try=try:\n\t%cursor%\nexcept Exception, ex:\n\t with=with %cursor%:\n\t def=def %cursor% (%cursor%):\n\t""" Function doc """\n\t class=class %cursor%:\n\t""" Class doc """\n\t\n\tdef __init__ (self):\n\t\t""" Class initialiser """\n\t\tpass
The second issue is that I'm wondering if there's code minimap planned for Geany? I'm surprised that Google only turns up one such request.
No, its not planned. Its probably implementable as a plugin if somebody wants to do it.
Cheers Lex
Thank you all, Best regards,
- Anh
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 13-12-01 10:55 AM, Anh wrote:
[snip]
- What's the best way to raise interest in a feature like Code minimap?
I looked at the Feature Request page on SourceForge and they seem to request mainly support for miscellaneous language. Whereas some of the slick Sublime-like features (minimap, multiple cursors, put both quotes around a highlighted word) would seem to be universally appealing.
You can put a feature request on the Geany-Plugins feature request tracker:
https://sourceforge.net/p/geany-plugins/feature-requests
Minimap is actually not that hard to make, I started writing a plugin to do this a while back but stopped working on it due to the fact that I find it annoying and would never use it myself (I disable it in SublimeText2 even). If someone wants to work on it, I might be able to find the code I started with.
Cheers, Matthew Brush
https://sourceforge.net/p/geany-plugins/feature-requests
Minimap is actually not that hard to make, I started writing a plugin to do this a while back but stopped working on it due to the fact that I find it annoying and would never use it myself (I disable it in SublimeText2 even). If someone wants to work on it, I might be able to find the code I started with.
I had a quick look at it yesterday too (it sounded interesting). One problem I ran into was that it seems pretty hard to add widgets to the notebook page of a document.
How did you solve this in your attempt, where did you put the minimap widget(s)? Having one minimap widget per document tab seemed like the right solution to me, but it wasn't very easy to implement.
Just wondering, not sure I'll work any more on the minimap but it was kind of fun to try. :)
Regards,
/Emil
Does anyone have any idea about my first problem, i.e. code snippet does not complete in Geany?
I'm using geany 1.23, Ubuntu 12.04, appropriate section for Python in snippets.conf (already reloaded / Geany restarted) When I type, say, "while<TAB>" it just inserts white space.
Best, - Anh
On Mon 02 Dec 2013 05:43:32 AM EST, Emil Brink wrote:
https://sourceforge.net/p/geany-plugins/feature-requests
Minimap is actually not that hard to make, I started writing a plugin to do this a while back but stopped working on it due to the fact that I find it annoying and would never use it myself (I disable it in SublimeText2 even). If someone wants to work on it, I might be able to find the code I started with.
I had a quick look at it yesterday too (it sounded interesting). One problem I ran into was that it seems pretty hard to add widgets to the notebook page of a document.
How did you solve this in your attempt, where did you put the minimap widget(s)? Having one minimap widget per document tab seemed like the right solution to me, but it wasn't very easy to implement.
Just wondering, not sure I'll work any more on the minimap but it was kind of fun to try. :)
Regards,
/Emil
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 02/12/13 20:14, Anh wrote:
Does anyone have any idea about my first problem, i.e. code snippet does not complete in Geany?
I'm using geany 1.23, Ubuntu 12.04, appropriate section for Python in snippets.conf (already reloaded / Geany restarted) When I type, say, "while<TAB>" it just inserts white space.
Best, - Anh
Anh, the keybinding option you want is ‘Complete snippet’ and you need to set it to something other than Tab. I used the return key.
Also, note that there are different keybindings for the initial snippet completion and moving the cursor to the next position, if there are more than one %cursor% instances in the relevant snippets.conf line.
Best of luck,
James
Thanks James, that works! Actually, I put "Complete snippet" back to <TAB> and now it works for <TAB> too. Very weird.
On Mon 02 Dec 2013 03:21:30 PM EST, James Brierley wrote:
On 02/12/13 20:14, Anh wrote:
Does anyone have any idea about my first problem, i.e. code snippet does not complete in Geany?
I'm using geany 1.23, Ubuntu 12.04, appropriate section for Python in snippets.conf (already reloaded / Geany restarted) When I type, say, "while<TAB>" it just inserts white space.
Best, - Anh
Anh, the keybinding option you want is ‘Complete snippet’ and you need to set it to something other than Tab. I used the return key.
Also, note that there are different keybindings for the initial snippet completion and moving the cursor to the next position, if there are more than one %cursor% instances in the relevant snippets.conf line.
Best of luck,
James
On 13-12-02 02:43 AM, Emil Brink wrote:
https://sourceforge.net/p/geany-plugins/feature-requests
Minimap is actually not that hard to make, I started writing a plugin to do this a while back but stopped working on it due to the fact that I find it annoying and would never use it myself (I disable it in SublimeText2 even). If someone wants to work on it, I might be able to find the code I started with.
I had a quick look at it yesterday too (it sounded interesting). One problem I ran into was that it seems pretty hard to add widgets to the notebook page of a document.
How did you solve this in your attempt, where did you put the minimap widget(s)? Having one minimap widget per document tab seemed like the right solution to me, but it wasn't very easy to implement.
In the re-write I mentioned in previous message, I ended up just hijacking each of the Scintilla widgets by removing them from their parent container, and placing into a new horizontal box along with the little mini zoomed out Scintilla and putting that back in place of the previous Scintilla. It's definitively not an optimal solution and likely to break with other plugins doing the same nonsense, but it works[0].
Cheers, Matthew Brush
[0]: Unless you put the new Scintilla on the left, then Geany finds that as its own and all hell breaks loose (will apply patch to Geany soon to fix it).
On 13-12-01 10:55 AM, Anh wrote:
[snip] 2. What's the best way to raise interest in a feature like Code minimap? I looked at the Feature Request page on SourceForge and they seem to request mainly support for miscellaneous language. Whereas some of the slick Sublime-like features (minimap, multiple cursors, put both quotes around a highlighted word) would seem to be universally appealing.
I ended up writing this just lately. It's still kind of experimental but it seems to work alright. It can be had here for now:
https://github.com/codebrainz/overview-plugin
Cheers, Matthew Brush