Hello,
First of all, thanks a lot for Geany - I've started using it only recently, but it's exactly what I needed; powerful, yet lightweight!
However, there is one issue that is really confusing to me - the way whitespace is ignored during "word-jumping" (for lack of a better term - i.e. using CTRL+Right/Left to move the cursor).
It's a bit tricky to explain, so here's an example: function foo() { lorem = "ipsum dolor sit amet"; }
If I use CTRL+Right to move the cursor, it will jump as follows (asterisk indicates cursor positions): *function* foo*() { lorem* = "ipsum*";* }*
However, I would expect it to move like this: *function* foo()* {* *lorem* =* "*ipsum*";* *}*
Is there any way to change this behavior?
Thanks!
On Wed, 3 Sep 2008 13:28:57 +0000 (UTC), AC gmane.0vd@gishpuppy.com wrote:
Hi,
First of all, thanks a lot for Geany - I've started using it only recently, but it's exactly what I needed; powerful, yet lightweight!
However, there is one issue that is really confusing to me - the way whitespace is ignored during "word-jumping" (for lack of a better term - i.e. using CTRL+Right/Left to move the cursor).
It's a bit tricky to explain, so here's an example: function foo() { lorem = "ipsum dolor sit amet"; }
If I use CTRL+Right to move the cursor, it will jump as follows (asterisk indicates cursor positions): *function* foo*() { lorem* = "ipsum*";* }*
However, I would expect it to move like this: *function* foo()* {* *lorem* =* "*ipsum*";* *}*
Is there any way to change this behavior?
Probably not. You may play with the hidden pref "use_gtk_word_boundaries" and set it to 'false' (should be 'true' by default).
To do so, open your ~/.geany/geany.conf wile Geany is not running, search this key and change its value. But I guess this also won't result in the desired behaviour.
Regards, Enrico
On Sat, 6 Sep 2008 12:47:49 +0000 (UTC), AC gmane.0vd@gishpuppy.com wrote:
Thanks for your response!
You may play with the hidden pref "use_gtk_word_boundaries" [...] But I guess this also won't result in the desired behaviour.
Unfortunately, you're right; that didn't help.
Is this a GTK or GNOME issue? Any clue where I might ask for help?
It's a Scintilla issue. I guess it wouldn't hurt to report this to the Scintilla project at https://sourceforge.net/tracker/?func=add&group_id=2439&atid=102439.
And it'd be cool if you could post the link to the report here for reference.
Regards, Enrico
On Sun, 7 Sep 2008 11:46:36 +0000 (UTC), AC gmane.0vd@gishpuppy.com wrote:
Is this a GTK or GNOME issue? Any clue where I might ask for help?
It's a Scintilla issue.
Hmm - I've also tried this in GEdit, and that exhibits the same irritating behavior... Also, I'd been using SciTE on Windows a while back, and never experienced this issue.
The SciTE on my system behaves more like what you want but even not exactly like that. But for some reason, I don't find the setting which causes the different behaviour. I checked the wordchars settings and even scrolling settings but with no luck. It's probably just a single setting which is different.
Regards, Enrico
The SciTE on my system behaves more like what you want but even not exactly like that. But for some reason, I don't find the setting which causes the different behaviour.
There are (currently) two comments to the ticket I've created* - but I'm not sure what to make of them: http://tinyurl.com/5frmdf (https://sourceforge.net/tracker/index.php?func=detail&aid=2100400&gr... 2439&atid=102439)
On Tue, 9 Sep 2008 11:03:21 +0000 (UTC), AC gmane.0vd@gishpuppy.com wrote:
The SciTE on my system behaves more like what you want but even not exactly like that. But for some reason, I don't find the setting which causes the different behaviour.
There are (currently) two comments to the ticket I've created* - but I'm not sure what to make of them:
eht16 is me :). nyamatongwe is Neil Hodgson, the Scintilla developer.
Just wait for his response.
Regards, Enrico
nyamatongwe is Neil Hodgson, the Scintilla developer. Just wait for his response.
So he's responded*, saying something about using the API to change the following settings: SCI_SETWORDCHARS, SCI_SETWHITESPACECHARS, SCI_WORDRIGHT and/or SCI_WORDRIGHTEND. Can this be configured in Geany somehow?
* http://tinyurl.com/5frmdf (https://sourceforge.net/tracker/index.php?func=detail&aid=2100400&gr... 2439&atid=102439)
On Sun, 14 Sep 2008 07:35:27 +0000 (UTC), AC gmane.0vd@gishpuppy.com wrote:
nyamatongwe is Neil Hodgson, the Scintilla developer. Just wait for his response.
So he's responded*, saying something about using the API to change the following settings: SCI_SETWORDCHARS, SCI_SETWHITESPACECHARS, SCI_WORDRIGHT and/or SCI_WORDRIGHTEND. Can this be configured in Geany somehow?
SCI_WORDRIGHT and SCI_WORDRIGHTEND are commands, which one is used can be controlled with the 'use_gtk_word_boundaries' preference.
SCI_SETWORDCHARS can be set with the 'wordchars' setting in filetypes.common[1] and additionally for particular filetypes in filetype.*[1].
SCI_SETWHITESPACECHARS can be changed in filetypes.common with the 'whitespace_chars' setting.
Since Geany already uses almost the same wordchars as SciTE, it might be the 'whitespace_chars' setting which is different. If you will find out anything, it would be nice if you could report it here. Thanks.
[1] filetypes.common and filetypes.* can be found in $prefix/share/geany.
Regards, Enrico
SCI_WORDRIGHT and SCI_WORDRIGHTEND are commands, which one is used can be controlled with the 'use_gtk_word_boundaries' preference.
Not quite sure how to change that preference, or what it means...
SCI_SETWHITESPACECHARS can be changed in filetypes.common with the 'whitespace_chars' setting.
I've shortened the setting in filetypes.common to this: whitespace_chars=\s\t([ Feels much better already - not perfect (e.g. it doesn't stop at the end of a line, and even skips blank lines completely), but it'll do.
FWIW, here's the snippet I've tested this with so far:
# Python def foo(): print bar
// JavaScript function foo() { alert(bar); }
Thanks again!
On Thu, 18 Sep 2008 18:25:31 +0000 (UTC), AC gmane.0vd@gishpuppy.com wrote:
SCI_WORDRIGHT and SCI_WORDRIGHTEND are commands, which one is used can be controlled with the 'use_gtk_word_boundaries' preference.
Not quite sure how to change that preference, or what it means...
Close Geany, open ~/.geany/geany.conf with an editor (not Geany) and search for the setting 'use_gtk_word_boundaries' and change its value (either from true to false or vice versa). Then restart Geany and check whether it helped or not.
Regards, Enrico
Close Geany, open ~/.geany/geany.conf with an editor (not Geany) and search for the setting 'use_gtk_word_boundaries' and change its value
Oh I see... I think we'd been there before though. Either way, I've tried it, and it doesn't change anything. I'll just stick with only the modified whitespace_chars then.
On Wed, 3 Sep 2008 13:28:57 +0000 (UTC) AC gmane.0vd@gishpuppy.com wrote:
However, I would expect it to move like this: *function* foo()* {* *lorem* =* "*ipsum*";* *}*
Is there any way to change this behavior?
You might want the Next/Previous word part editor commands: http://www.geany.org/manual/dev/index.html#keyboard-commands
Previous word part. Ctrl+/ Next word part. Ctrl+\
These are not configurable at the moment, but we'll make them so soon.
Regards, Nick
You might want the Next/Previous word part editor commands
Thanks for that! It's almost what I need - however, it treats whitespace as individual words, resulting in excessively (IMHO) fine-grained jumps: *function* %foo()* %{* *lorem* %=* %"*ipsum*";* *}* I've marked positions I think are superfluous with "%".
Sorry to be a pain about this, but it's something I use all the time, so it directly affects my work...
On Thu, 11 Sep 2008 08:32:20 +0000 (UTC) AC gmane.0vd@gishpuppy.com wrote:
You might want the Next/Previous word part editor commands
Thanks for that! It's almost what I need - however, it treats whitespace as individual words, resulting in excessively (IMHO) fine-grained jumps: *function* %foo()* %{* *lorem* %=* %"*ipsum*";* *}* I've marked positions I think are superfluous with "%".
Sorry to be a pain about this, but it's something I use all the time, so it directly affects my work...
OK, just wanted to mention it. Also it stops between long*_function*_names as well.
Regards, Nick
Nick Treleaven wrote:
You might want the Next/Previous word part editor commands: http://www.geany.org/manual/dev/index.html#keyboard-commands
Previous word part. Ctrl+/ Next word part. Ctrl+\
Beauty! Thanks for mentioning that, I'd completely missed it in the manual. A very handy pair of bindings, especially for messing with SQL column and table names.
cheers, mate!
On Thu, 11 Sep 2008 20:49:18 +1000, Ross McKay rosko@zeta.org.au wrote:
Nick Treleaven wrote:
You might want the Next/Previous word part editor commands: http://www.geany.org/manual/dev/index.html#keyboard-commands
Previous word part. Ctrl+/ Next word part. Ctrl+\
Beauty! Thanks for mentioning that, I'd completely missed it in the manual. A very handy pair of bindings, especially for messing with SQL
It's mentioned at: http://www.geany.org/manual/0.14/#keyboard-commands
But when they are made configurable, they would move to http://www.geany.org/manual/0.14/#configurable-keybindings
And making them configurable is a very good idea as the default keys ('/' and '') are almost unusable on for example a German keyboard. The Next command is ok, you need to press Ctrl-Alt Gr-ß, but for the Previous command you need to press Ctrl-Shift-7 but this raises a selection because of the shift key. Pretty uncomfortable.
Regards, Enrico
On Fri, 12 Sep 2008 10:53:28 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 11 Sep 2008 20:49:18 +1000, Ross McKay rosko@zeta.org.au wrote:
Nick Treleaven wrote:
You might want the Next/Previous word part editor commands: http://www.geany.org/manual/dev/index.html#keyboard-commands
Previous word part. Ctrl+/ Next word part. Ctrl+\
...
And making them configurable is a very good idea as the default keys ('/' and '') are almost unusable on for example a German keyboard. The Next command is ok, you need to press Ctrl-Alt Gr-ß, but for the Previous command you need to press Ctrl-Shift-7 but this raises a selection because of the shift key. Pretty uncomfortable.
Heh, not good combinations. On a UK keyboard the \ is on the left and / on the right, so counterintuitive - maybe they were set for use on a US keyboard.
Regards, Nick
On Fri, 12 Sep 2008 12:24:56 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Fri, 12 Sep 2008 10:53:28 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 11 Sep 2008 20:49:18 +1000, Ross McKay rosko@zeta.org.au wrote:
Nick Treleaven wrote:
You might want the Next/Previous word part editor commands: http://www.geany.org/manual/dev/index.html#keyboard-commands
Previous word part. Ctrl+/ Next word part. Ctrl+\
...
And making them configurable is a very good idea as the default keys ('/' and '') are almost unusable on for example a German keyboard. The Next command is ok, you need to press Ctrl-Alt Gr-ß, but for the Previous command you need to press Ctrl-Shift-7 but this raises a selection because of the shift key. Pretty uncomfortable.
Heh, not good combinations. On a UK keyboard the \ is on the left and / on the right, so counterintuitive - maybe they were set for use on a US keyboard.
Probably, it's not a big problem as long as they can be changed. I think I will change the code at the end of next week except you will do it before :).
Regards, Enrico
On Fri, 12 Sep 2008 13:32:30 +0200, Enrico Tröger enrico.troeger@uvena.de wrote:
On Fri, 12 Sep 2008 12:24:56 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Fri, 12 Sep 2008 10:53:28 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 11 Sep 2008 20:49:18 +1000, Ross McKay rosko@zeta.org.au wrote:
Nick Treleaven wrote:
You might want the Next/Previous word part editor commands: http://www.geany.org/manual/dev/index.html#keyboard-commands
Previous word part. Ctrl+/ Next word part. Ctrl+\
...
And making them configurable is a very good idea as the default keys ('/' and '') are almost unusable on for example a German keyboard. The Next command is ok, you need to press Ctrl-Alt Gr-ß, but for the Previous command you need to press Ctrl-Shift-7 but this raises a selection because of the shift key. Pretty uncomfortable.
Heh, not good combinations. On a UK keyboard the \ is on the left and / on the right, so counterintuitive - maybe they were set for use on a US keyboard.
Probably, it's not a big problem as long as they can be changed. I think I will change the code at the end of next week except you will do it before :).
With some more delay than planned, the configurable 'previous/next word part' keybindings finally landed in SVN.
The only problem is that the +Shift variant doesn't work once they have been changed. That means, by default Ctrl+/ jumps to the previous word start, Ctrl+Shift+/ jumps to the previous word start and starts a selection to the new position (same for next word start). If this keybinding was changed, let's say to Ctrl-4, Ctrl-Shift-4 doesn't do anything instead to jump to the previous word start with raising a selection is still bound to Ctrl-Shift-/. But this affects only users who actually change this keybinding.
If this is a big issue for people, we could add two additional keybindings for the case when Shift is pressed. But these would have to be changed as well. So there are even more configuration efforts necessary. Alternatively we could add some hacks to the code which allows the Shift key to these both particular keybindings.
I don't like both ways (the last one fewest :D).
Regards, Enrico
the configurable 'previous/next word part' keybindings finally landed in SVN
Thanks for that!
The only problem is that the +Shift variant doesn't work once they have been changed.
Not sure I understand this - but it doesn't sound too horrible (merely a little odd... ).
On Mon, 29 Sep 2008 20:25:41 +0000 (UTC), AC gmane.0vd@gishpuppy.com wrote:
the configurable 'previous/next word part' keybindings finally landed in SVN
Thanks for that!
The only problem is that the +Shift variant doesn't work once they have been changed.
Not sure I understand this - but it doesn't sound too horrible (merely a little odd... ).
By default, Ctrl-/ sets the cursor to the previous word, when additionally pressing Shift, it sets the cursor to the previous word *and* creates a selection from the original position to the new one. If you change the Ctrl-/ keybinding to e.g. Ctrl-8, this doesn't work anymore. Then jumping to the previous word is Ctrl-8 but creating a selection while jumping to the previous word is still Ctrl-Shift-/. (same goes for next word part)
So, this limitation is only relevant if you want to create selections while jumping between word parts.
Regards, Enrico
On Fri, 26 Sep 2008 20:29:43 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
With some more delay than planned, the configurable 'previous/next word part' keybindings finally landed in SVN.
The only problem is that the +Shift variant doesn't work once they have been changed. That means, by default Ctrl+/ jumps to the previous word start, Ctrl+Shift+/ jumps to the previous word start and starts a selection to the new position (same for next word start). If this keybinding was changed, let's say to Ctrl-4, Ctrl-Shift-4 doesn't do anything instead to jump to the previous word start with raising a selection is still bound to Ctrl-Shift-/. But this affects only users who actually change this keybinding.
Ctrl-Shift-[/] has never worked for me. I think it's because holding shift changes the key character from '/' to '?'.
If this is a big issue for people, we could add two additional keybindings for the case when Shift is pressed. But these would have to be changed as well. So there are even more configuration efforts necessary. Alternatively we could add some hacks to the code which allows the Shift key to these both particular keybindings.
I don't like both ways (the last one fewest :D).
Personally I'd like it to work the second way, holding shift as well as the configured binding works to extend the selection. This would be useful for the 'Go to line end/start' bindings as well. For the reason I mentioned above, this wouldn't work for any keys that have a different character when shift is pressed, but it would work for the alphabet, control characters and the numeric keypad.
I could look at implementing this if it's OK.
Regards, Nick
On Thu, 2 Oct 2008 12:04:47 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
If this is a big issue for people, we could add two additional keybindings for the case when Shift is pressed. But these would have to be changed as well. So there are even more configuration efforts necessary. Alternatively we could add some hacks to the code which allows the Shift key to these both particular keybindings.
I don't like both ways (the last one fewest :D).
Personally I'd like it to work the second way, holding shift as well as the configured binding works to extend the selection. This would be useful for the 'Go to line end/start' bindings as well. For the reason I mentioned above, this wouldn't work for any keys that have a different character when shift is pressed, but it would work for the alphabet, control characters and the numeric keypad.
I'm not sure about the others, but yes, it should work for the alphabet. But this is all ugly due to different keyboard layout and different concepts.
If people would use their mouse, things were much easier :). (j/k)
More seriously, the question to me is if it's worth all the effort because I think many people don't use for instance the 'jump to [left|right] word part' binding very often and even less people will re-configure it. Maybe I'm wrong with that.
I could look at implementing this if it's OK.
Sure, if you like to.
Regards, Enrico
On Thu, 2 Oct 2008 14:52:50 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 2 Oct 2008 12:04:47 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
If this is a big issue for people, we could add two additional keybindings for the case when Shift is pressed. But these would have to be changed as well. So there are even more configuration efforts necessary. Alternatively we could add some hacks to the code which allows the Shift key to these both particular keybindings.
I don't like both ways (the last one fewest :D).
Personally I'd like it to work the second way, holding shift as well as the configured binding works to extend the selection. This would be useful for the 'Go to line end/start' bindings as well. For the reason I mentioned above, this wouldn't work for any keys that have a different character when shift is pressed, but it would work for the alphabet, control characters and the numeric keypad.
I'm not sure about the others, but yes, it should work for the alphabet. But this is all ugly due to different keyboard layout and different concepts.
If people would use their mouse, things were much easier :). (j/k)
Heh ;-)
More seriously, the question to me is if it's worth all the effort because I think many people don't use for instance the 'jump to [left|right] word part' binding very often and even less people will re-configure it. Maybe I'm wrong with that.
I use it quite often, but as I mentioned the extend selection bindings don't work (at least for a UK keyboard). I don't think it would be difficult or too ugly to have Geany handle this, assuming the key-combination would not otherwise be matched.
(Also the people who requested bindings instead of home/end probably would prefer using +shift to extend selections for those.)
Regards, Nick