Hi,
I recently found geany and I must say it is a really nice IDE. I'd like to use it as my main editor but there are still a few things I miss to make the switch completely (I currently use emacs). Some of them might actually be my lack of experience with geany (I'm using the latest checkout from the svn repository). Some of these might have been already asked in the past:
- Tags generation for C/C++ files shouldn't use the C preprocessor. I try to use it with the Linux kernel but there is no way I could add the required Linux definitions and includes on the "geany -g" command line, especially when I build the kernel outside the source tree and extra links are required for the include directories. Since geany can generate the tags from the loaded files directly, I don't understand why it calls cpp when running from the command line. My current workaround is to load plenty of files (I use "find tag definition" quite often to navigate the source). Another alternative is to use something like sed or awk to translate ctags into geany tags but I haven't looked at how close the formats are. Yet another alternative is to allow geany to save the tags so that I can close the files but be able to load the previously generated tags
- Allow additional regexp to be specified for tag detection (I do this with ctags)
- "find *next* tag definition/declaration" command as it normally stops at the first definition. There could be others, especially in the Linux kernel when many functions have different implementations depending on the architecture
- Command to find a tag definition via a dialogue box rather than the word in an editor
- Navigating back after finding a tag should go to the previous position where the find command was invoked. It currently goes to the beginning of the buffer if the tag was found in the current buffer (more annoying) or returns to one line before the previous position (acceptable, though it would be better to return on the same line and column)
- Some preferences should be per project or file type to accommodate different coding standards (i.e. Linux kernel work vs some internal company project). I also prefer Python indentation to use spaces and C indentation to use tabs but geany only supports one setting for all
- Remember the opened files per project rather than global (unless no project was opened). I work on more than one project and start several geany instances
Otherwise, thanks for creating and maintaining this wonderful tool.
Regards.
-- Catalin
On 24/09/07 14:36:55, Catalin Marinas wrote:
- Tags generation for C/C++ files shouldn't use the C preprocessor. I
try to use it with the Linux kernel but there is no way I could add the required Linux definitions and includes on the "geany -g" command line, especially when I build the kernel outside the source tree and extra links are required for the include directories. Since geany can
OK. I've only used it for generating tags for installed libraries, e.g. GTK, then I can just pass CFLAGS=`pkg-config gtk+-2.0 --cflags`.
generate the tags from the loaded files directly, I don't understand why it calls cpp when running from the command line. My current
It can be useful - for the GTK example I only have to pass the main gtk.h header file and the preprocessor will include the rest. But I think we could add an option not to preprocess files. I hadn't thought of it before - I assumed that if the preprocessor has errors they can just be ignored - doesn't this work?
[...]
- Allow additional regexp to be specified for tag detection (I do
this with ctags)
Out of interest, when would you use that? Perhaps it's better just to improve the language parsers.
- "find *next* tag definition/declaration" command as it normally
stops at the first definition. There could be others, especially in the Linux kernel when many functions have different implementations depending on the architecture
Sounds good.
- Command to find a tag definition via a dialogue box rather than the
word in an editor
Good again ;-)
- Navigating back after finding a tag should go to the previous
position where the find command was invoked. It currently goes to the beginning of the buffer if the tag was found in the current buffer (more annoying) or returns to one line before the previous position (acceptable, though it would be better to return on the same line and column)
Sorry, I don't really understand this. Do you mean goto tag definition or find? Also I can't reproduce the off-by-one-line problem.
- Some preferences should be per project or file type to accommodate
different coding standards (i.e. Linux kernel work vs some internal company project). I also prefer Python indentation to use spaces and C indentation to use tabs but geany only supports one setting for all
We have been meaning to do this. One workaround is to use different configuration directories with the -c option, but this clearly isn't ideal.
- Remember the opened files per project rather than global (unless no
project was opened). I work on more than one project and start several geany instances
Again, this is planned - but we hadn't updated the TODO to say it(!)
Regards, Nick
On 24/09/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 24/09/07 14:36:55, Catalin Marinas wrote:
generate the tags from the loaded files directly, I don't understand why it calls cpp when running from the command line. My current
It can be useful - for the GTK example I only have to pass the main gtk.h header file and the preprocessor will include the rest. But I think we could add an option not to preprocess files.
BTW, can geany find a tag definition from the tags list but when the file isn't loaded?
I hadn't thought of it before - I assumed that if the preprocessor has errors they can just be ignored - doesn't this work?
It seems to stop and the tags file only had about 4 lines.
[...]
- Allow additional regexp to be specified for tag detection (I do
this with ctags)
Out of interest, when would you use that? Perhaps it's better just to improve the language parsers.
I wouldn't improve the parser since these are not part of the core language. For example, Linux has C macros used in asm files to define a functions (like ENTRY) but I think the default parser gets confused.
- Navigating back after finding a tag should go to the previous
position where the find command was invoked. It currently goes to the beginning of the buffer if the tag was found in the current buffer (more annoying) or returns to one line before the previous position (acceptable, though it would be better to return on the same line and column)
Sorry, I don't really understand this. Do you mean goto tag definition or find? Also I can't reproduce the off-by-one-line problem.
I meant "go to tag definition/declaration". My work-flow is to go to different tag definitions to follow a calling tree and want to go back to where I started. After a bit more testing, I noticed that geany only remembers the position of a cursor placed with the mouse (left click) or just the first line if no mouse was pressed. I usually use the keyboard to navigate but geany doesn't remember the last position of the mouse if it was moved with the arrow keys.
It also doesn't remember the column, only the line and goes back to the beginning of the line.
- Some preferences should be per project or file type to accommodate
different coding standards (i.e. Linux kernel work vs some internal company project). I also prefer Python indentation to use spaces and C indentation to use tabs but geany only supports one setting for all
We have been meaning to do this. One workaround is to use different configuration directories with the -c option, but this clearly isn't ideal.
Thanks for this. It is not ideal but it works for now.
Regards.
On 9/24/07, Catalin Marinas catalin.marinas@gmail.com wrote:
I also prefer Python indentation to use spaces and C indentation to use tabs but geany only supports one setting for all
One workaround is to use different configuration directories with the -c option, but this clearly isn't ideal.
Thanks for this. It is not ideal but it works for now.
Or use the Lua plugin :-)
It provides for a set of scripts in ~/.geany/plugins/lua/events/ that will run each time a file is opened or activated. For my needs, I set up a fairly simple rule:
"Always use spaces, unless it's a makefile, or if it it already contains tabs"
So, my "opened.lua" and "activated.lua" scripts both do this:
geany.scintilla("SetUseTabs", string.match(string.lower(geany.fileinfo().name), "^makefile.*")~=nil or string.find(geany.text(), "\t")~=nil)
This has the advantage that it's not limited to filetypes, content or any other criteria. It allows whatever absurdly complex rules the user's heart desires, use tabs in the morning and spaces in the afternoon, with a tab width of 4 unless the filename begins with a capital letter, then use a tab width of 13, except on Aunt Mable's birthday ;)
- Jeff
On 25/09/2007, Jeff Pohlmeyer yetanothergeek@gmail.com wrote:
On 9/24/07, Catalin Marinas catalin.marinas@gmail.com wrote:
I also prefer Python indentation to use spaces and C indentation to use tabs but geany only supports one setting for all
One workaround is to use different configuration directories with the -c option, but this clearly isn't ideal.
Thanks for this. It is not ideal but it works for now.
Or use the Lua plugin :-)
This looks interesting but I couldn't download it (the site was returning an empty page).
I use something similar for emacs but Lua scripts are much more readable :-).
http://www.hotlinkfiles.com/files/354592_9bw1h/geanylua.so.gz
On 9/25/07, Catalin Marinas catalin.marinas@gmail.com wrote:
On 25/09/2007, Jeff Pohlmeyer yetanothergeek@gmail.com wrote:
Or use the Lua plugin :-)
This looks interesting but I couldn't download it (the site was returning an empty page).
Hmmm... That's strange, it seems to be working from here: http://yetanothergeek.justfree.com/geanylua/
If not, maybe try this (temporary) link: http://www.hotlinkfiles.com/files/354590_ndidz/geanylua.tar.gz
- Jeff
Just a mention. A while back I wrote about my dislike of requiring use of the mouse for simple things.
Recently I found myself working on a large project with changes in many files in several directories. I needed to switch back and forth a lot. So I went back to jEdit where I have key shortcuts to take me to a buffer list (organized by directory) and then with the keyboard I was able to select the buffer I needed to work on and then get back to editing without a mouse.
Same goes for opening new files. Don't need the mouse. Simple key strokes do it all.
So I was able to navigate several directories and many files with ease and speed. Maybe it's just me, but for the wishlist, I wish the same were true for Geany, cause I like Geany.
chuck
On Sun, 30 Sep 2007 00:58:44 +0200, chuck ctl@arrowtwins.com wrote:
Just a mention. A while back I wrote about my dislike of requiring use of the mouse for simple things.
Recently I found myself working on a large project with changes in many files in several directories. I needed to switch back and forth a lot. So I went back to jEdit where I have key shortcuts to take me to a buffer list (organized by directory) and then with the keyboard I was able to select the buffer I needed to work on and then get back to editing without a mouse.
Did you know you can switch between opened files in geany pressing the popup-menu-key (left to the right Ctrl-Key)? - That list may is not ordered by different directories, but maybe it helps you working faster and without Mouse... :)
Same goes for opening new files. Don't need the mouse. Simple key strokes do it all.
Pressing Ctrl-O and navigating with Tab and the Arrow-Keys through the Open-File-Dialog works fine for me with Geany. I don't unterstand your Problem here?
So I was able to navigate several directories and many files with ease and speed. Maybe it's just me, but for the wishlist, I wish the same were true for Geany, cause I like Geany.
chuck
Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
On 30/09/2007, Dominic Hopf dmaphy_damastasif@gmx.net wrote:
Did you know you can switch between opened files in geany pressing the popup-menu-key (left to the right Ctrl-Key)? - That list may is not ordered by different directories, but maybe it helps you working faster and without Mouse... :)
It would be useful to have a key two switch to the opened files side-bar. In that bar, it would be useful to locate a file by typing the first letters rather than using the arrows.
Many times I end up having tens of files opened and using the popup-meny-key is not an option. I use the mouse to choose from the opened files side-bar or simple Ctrl-O and look-up the file.
On 02/10/07 10:57:59, Catalin Marinas wrote:
On 30/09/2007, Dominic Hopf dmaphy_damastasif@gmx.net wrote:
Did you know you can switch between opened files in geany pressing
the
popup-menu-key (left to the right Ctrl-Key)? - That list may is not ordered by different directories, but maybe it helps you working
faster
and without Mouse... :)
It would be useful to have a key two switch to the opened files side-bar. In that bar, it would be useful to locate a file by typing the first letters rather than using the arrows.
Many times I end up having tens of files opened and using the popup-meny-key is not an option. I use the mouse to choose from the opened files side-bar or simple Ctrl-O and look-up the file.
I think we can add this after the current release string freeze is over. This is also why we haven't added an option for your line trailing spaces patch - we'll add it after 0.12 is released ;-)
Regards, Nick
On 03/10/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 02/10/07 10:57:59, Catalin Marinas wrote:
It would be useful to have a key two switch to the opened files side-bar. In that bar, it would be useful to locate a file by typing the first letters rather than using the arrows.
I think we can add this after the current release string freeze is over.
That's fine. I'll probably use the svn version anyway.
This is also why we haven't added an option for your line trailing spaces patch - we'll add it after 0.12 is released ;-)
Since you mentioned it, I think an option should stay in the Editor preference tab rather than in the Document one (together with the stripping on save) as they are slightly different. They can both co-exist, though the latter makes the former pretty useless.
I attach a patch which adds the configuration options and Editor preference checkbox. Feel free to change the names if you don't find them appropriate.
On 03/10/07 13:47:48, Catalin Marinas wrote:
On 03/10/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 02/10/07 10:57:59, Catalin Marinas wrote: This is also why we haven't added an option for your line trailing spaces patch - we'll add it after 0.12 is released ;-)
Since you mentioned it, I think an option should stay in the Editor preference tab rather than in the Document one (together with the stripping on save) as they are slightly different. They can both co-exist, though the latter makes the former pretty useless.
I attach a patch which adds the configuration options and Editor preference checkbox. Feel free to change the names if you don't find them appropriate.
Thanks for the patch, now applied in SVN. Sorry for the delay ;-)
Regards, Nick
On 18/10/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 03/10/07 13:47:48, Catalin Marinas wrote:
I attach a patch which adds the configuration options and Editor preference checkbox. Feel free to change the names if you don't find them appropriate.
Thanks for the patch, now applied in SVN. Sorry for the delay ;-)
Thanks. I'm not sure it matters much but, for people not using this feature, it's better to call sci_get_current_line inside the "if (editor_prefs.newline_strip)" block (unless this function is relatively cheap).
On 19/10/07 13:35:41, Catalin Marinas wrote:
On 18/10/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 03/10/07 13:47:48, Catalin Marinas wrote:
I attach a patch which adds the configuration options and Editor preference checkbox. Feel free to change the names if you don't
find
them appropriate.
Thanks for the patch, now applied in SVN. Sorry for the delay ;-)
Thanks. I'm not sure it matters much but, for people not using this feature, it's better to call sci_get_current_line inside the "if (editor_prefs.newline_strip)" block (unless this function is relatively cheap).
It's insignificant really, compared to the redrawing of the scintilla widget.
Regards, Nick
On 24/09/07 22:28:40, Catalin Marinas wrote:
On 24/09/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 24/09/07 14:36:55, Catalin Marinas wrote:
BTW, can geany find a tag definition from the tags list but when the file isn't loaded?
No - the global tags file currently doesn't store the filename.
I hadn't thought of it before - I assumed that if the preprocessor has errors they
can
just be ignored - doesn't this work?
It seems to stop and the tags file only had about 4 lines.
OK, I'll add the option sometime.
[...]
- Allow additional regexp to be specified for tag detection (I do
this with ctags)
Out of interest, when would you use that? Perhaps it's better just
to
improve the language parsers.
I wouldn't improve the parser since these are not part of the core language. For example, Linux has C macros used in asm files to define a functions (like ENTRY) but I think the default parser gets confused.
Well, this might be tricky. Geany tags files store what kind of tag it is, and so allowing regex tags could be messy. Also the tag files are per language, so maybe it wouldn't work in your example.
- Navigating back after finding a tag should go to the previous
position where the find command was invoked. It currently goes to
the
beginning of the buffer if the tag was found in the current
buffer
(more annoying) or returns to one line before the previous
position
(acceptable, though it would be better to return on the same line
and
column)
Sorry, I don't really understand this. Do you mean goto tag
definition
or find? Also I can't reproduce the off-by-one-line problem.
I meant "go to tag definition/declaration". My work-flow is to go to different tag definitions to follow a calling tree and want to go back to where I started. After a bit more testing, I noticed that geany only remembers the position of a cursor placed with the mouse (left click) or just the first line if no mouse was pressed. I usually use the keyboard to navigate but geany doesn't remember the last position of the mouse if it was moved with the arrow keys.
You're right, it's weird we hadn't noticed this - I'll look into it.
It also doesn't remember the column, only the line and goes back to the beginning of the line.
Perhaps this can be improved in future.
Regards, Nick
On 25/09/07 12:27:27, Nick Treleaven wrote:
On 24/09/07 22:28:40, Catalin Marinas wrote:
I meant "go to tag definition/declaration". My work-flow is to go
to
different tag definitions to follow a calling tree and want to go back to where I started. After a bit more testing, I noticed that geany only remembers the position of a cursor placed with the mouse (left click) or just the first line if no mouse was pressed. I usually
use
the keyboard to navigate but geany doesn't remember the last
position
of the mouse if it was moved with the arrow keys.
You're right, it's weird we hadn't noticed this - I'll look into it.
This should be fixed now in SVN - thanks for reporting it.
Regards, Nick
On 25/09/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 24/09/07 22:28:40, Catalin Marinas wrote:
On 24/09/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 24/09/07 14:36:55, Catalin Marinas wrote:
BTW, can geany find a tag definition from the tags list but when the file isn't loaded?
No - the global tags file currently doesn't store the filename.
It would actually be useful. I do a lot of source navigation on Linux but I can't load all the files, I prefer to only load those I need.
I got a workaround which seems to be OK so far: generate the Linux tags with 'ctags -n' (symbol names and line numbers) and define a custom command to invoke a script that greps the tags file and invoke geany with the files and line number it found:
find-tag.sh /absolute/path/to/tags %s
The find-tag.sh script is attached.
It would be nice if geany remembers the previous position when a new file is opened (either via menu or geany invocation) or when switching to a different buffer is a result of a different geany invocation.
The custom command is really useful, maybe geany should allow more than one (and maybe allow them to be named).
Regards.
On 25/09/07 22:44:42, Catalin Marinas wrote:
On 25/09/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 24/09/07 22:28:40, Catalin Marinas wrote:
On 24/09/2007, Nick Treleaven nick.treleaven@btinternet.com
wrote:
On 24/09/07 14:36:55, Catalin Marinas wrote:
BTW, can geany find a tag definition from the tags list but when
the
file isn't loaded?
No - the global tags file currently doesn't store the filename.
It would actually be useful. I do a lot of source navigation on Linux but I can't load all the files, I prefer to only load those I need.
Perhaps it could be made an option whether to store the filename or not. For system headers it's not necessary, but for checking source files I guess it would be.
[...] It would be nice if geany remembers the previous position when a new file is opened (either via menu or geany invocation) or when switching to a different buffer is a result of a different geany invocation.
Could be useful.
The custom command is really useful, maybe geany should allow more than one (and maybe allow them to be named).
I think you mean Context Action command (there's also custom commands for replacing selected text).
Regards, Nick
On 26/09/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 25/09/07 22:44:42, Catalin Marinas wrote:
The custom command is really useful, maybe geany should allow more than one (and maybe allow them to be named).
I think you mean Context Action command (there's also custom commands for replacing selected text).
I meant Context Action. I'm pretty new to geany and I confuse terms.
On 9/25/07, Catalin Marinas catalin.marinas@gmail.com wrote:
The custom command is really useful, maybe geany should allow more than one (and maybe allow them to be named).
As a (slightly ugly) workaround you could use a tool like gxmessage or zenity to give you more options...
- Jeff
On 24/09/07 22:28:40, Catalin Marinas wrote:
On 24/09/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 24/09/07 14:36:55, Catalin Marinas wrote:
generate the tags from the loaded files directly, I don't
understand
why it calls cpp when running from the command line. My current
It can be useful - for the GTK example I only have to pass the main gtk.h header file and the preprocessor will include the rest. But I think we could add an option not to preprocess files.
There's now an option, --no-preprocessing (or -P) to do this. Hopefully that should do what you want.
Regards, Nick
On 28/09/2007, Nick Treleaven nick.treleaven@btinternet.com wrote:
There's now an option, --no-preprocessing (or -P) to do this. Hopefully that should do what you want.
Many thanks. It works OK and I get code completion for the Linux kernel.