I've got Geany set to always use spaces (4 space indents). Autoindentation is on (set to "Advanced").
At the end of a block, I hit Enter and get the auto-indent, but then want to back up 4 spaces. Is there a way to delete those extra 4 spaces without having to hit my backspace key 4 times?
I was hoping Shift-Tab would do it. But Shift-Tab only moves the cursor back 4 spaces, leaving those 4 extra spaces still hanging off the end. (Yes, I have Prefs --> Files tab --> "Strip trailing spaces" enabled, but still, the behaviour of Shift-Tab doesn't seem right.)
I tried Shift-Ctrl-i, but that moved the cursor back only one space. This seems like a bug (I'd expect it to behave the same as Shift-Tab).
---John
On Thu, 3 May 2007 12:23:48 -0400, "John Gabriele" jmg3000@gmail.com wrote:
I've got Geany set to always use spaces (4 space indents). Autoindentation is on (set to "Advanced").
At the end of a block, I hit Enter and get the auto-indent, but then want to back up 4 spaces. Is there a way to delete those extra 4 spaces without having to hit my backspace key 4 times?
I was hoping Shift-Tab would do it. But Shift-Tab only moves the cursor back 4 spaces, leaving those 4 extra spaces still hanging off the end. (Yes, I have Prefs --> Files tab --> "Strip trailing spaces" enabled, but still, the behaviour of Shift-Tab doesn't seem right.)
I tried Shift-Ctrl-i, but that moved the cursor back only one space. This seems like a bug (I'd expect it to behave the same as Shift-Tab).
I'm not completely sure what you mean, sorry. Could you send me a little example? (maybe per PM)
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
On 5/5/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 3 May 2007 12:23:48 -0400, "John Gabriele" jmg3000@gmail.com wrote:
I've got Geany set to always use spaces (4 space indents). Autoindentation is on (set to "Advanced").
At the end of a block, I hit Enter and get the auto-indent, but then want to back up 4 spaces. Is there a way to delete those extra 4 spaces without having to hit my backspace key 4 times?
I was hoping Shift-Tab would do it. But Shift-Tab only moves the cursor back 4 spaces, leaving those 4 extra spaces still hanging off the end. (Yes, I have Prefs --> Files tab --> "Strip trailing spaces" enabled, but still, the behaviour of Shift-Tab doesn't seem right.)
I tried Shift-Ctrl-i, but that moved the cursor back only one space. This seems like a bug (I'd expect it to behave the same as Shift-Tab).
I'm not completely sure what you mean, sorry. Could you send me a little example?
Sure.
I'm working on a Python file. Maybe in some method that's part of a class, so I'm already indented by, say, 8 spaces total:
I type: "for i in range(10):" and hit Enter. The next line is indented by the usual 4 spaces:
class Foo(object): def foo(): for in in range(10): #... I'm here now.
I type some command like "do_something()", then hit Enter. At this point, I'm still indented, but I'm done with the "for" statement, and want to go back to the indentation level of the foo() method.
class Foo(object): def foo(): for in in range(10): do_something() # I want to get back to this indentation level.
Currently, Geany makes me hit the backspace key 4 times to get back there. I want a way to hit one key (or Ctrl-some_key) to do it. I realize that if I were using tabs, I could just hit backspace once, but I'm using spaces exclusively (as many folks do).
Vim has a key for this (Ctrl-d maybe? -- I can't recall as I haven't used vim in a very long time). Some other editors try to be smart and delete all 4 spaces if the last thing it did was an autoindent (I think nedit may do this). Emacs does something completely different (it shifts the line around when you hit Tab to the "proper" indentation, regardless of where the cursor is).
---John
John Gabriele wrote:
Currently, Geany makes me hit the backspace key 4 times to get back there. I want a way to hit one key (or Ctrl-some_key) to do it. I realize that if I were using tabs, I could just hit backspace once,
That would be the behavior that I'd like also. I use spaces exclusively, but would like to single-press backspace to go one indentation back...
but I'm using spaces exclusively (as many folks do).
-H-
On Sun, 6 May 2007 16:35:05 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 5/5/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 3 May 2007 12:23:48 -0400, "John Gabriele" jmg3000@gmail.com wrote:
I've got Geany set to always use spaces (4 space indents). Autoindentation is on (set to "Advanced").
At the end of a block, I hit Enter and get the auto-indent, but then want to back up 4 spaces. Is there a way to delete those extra 4 spaces without having to hit my backspace key 4 times?
I was hoping Shift-Tab would do it. But Shift-Tab only moves the cursor back 4 spaces, leaving those 4 extra spaces still hanging off the end. (Yes, I have Prefs --> Files tab --> "Strip trailing spaces" enabled, but still, the behaviour of Shift-Tab doesn't seem right.)
I tried Shift-Ctrl-i, but that moved the cursor back only one space. This seems like a bug (I'd expect it to behave the same as Shift-Tab).
I'm not completely sure what you mean, sorry. Could you send me a little example?
Sure.
I'm working on a Python file. Maybe in some method that's part of a class, so I'm already indented by, say, 8 spaces total:
I type: "for i in range(10):" and hit Enter. The next line is indented by the usual 4 spaces:
class Foo(object): def foo(): for in in range(10): #... I'm here now.
I type some command like "do_something()", then hit Enter. At this point, I'm still indented, but I'm done with the "for" statement, and want to go back to the indentation level of the foo() method.
class Foo(object): def foo(): for in in range(10): do_something() # I want to get back to this indentation level.
Currently, Geany makes me hit the backspace key 4 times to get back there. I want a way to hit one key (or Ctrl-some_key) to do it. I realize that if I were using tabs, I could just hit backspace once, but I'm using spaces exclusively (as many folks do).
Ctrl+Shit+I to decrease current indentation. Unfortunately, it didn't work correctly until SVN r1514. It was working only when one is using tabs and not spaces for indentation, now it also works for spaces only. So, Ctrl+Shift+I decreases now the indentation by the amount of the tab width(which can be set in the preferences dialog).
Thanks for reporting.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
On 05/08/2007 05:16:26 PM, Enrico Tröger wrote:
On Sun, 6 May 2007 16:35:05 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 5/5/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 3 May 2007 12:23:48 -0400, "John Gabriele" jmg3000@gmail.com wrote:
I've got Geany set to always use spaces (4 space indents). Autoindentation is on (set to "Advanced").
At the end of a block, I hit Enter and get the auto-indent, but then want to back up 4 spaces. Is there a way to delete those extra 4 spaces without having to hit my backspace key 4 times? [...]
class Foo(object): def foo(): for in in range(10): do_something() # I want to get back to this indentation level.
Currently, Geany makes me hit the backspace key 4 times to get back there. I want a way to hit one key (or Ctrl-some_key) to do it. I realize that if I were using tabs, I could just hit backspace once, but I'm using spaces exclusively (as many folks do).
Ctrl+Shift+I to decrease current indentation. Unfortunately, it didn't work correctly until SVN r1514. It was working only when one is using tabs and not spaces for indentation, now it also works for spaces only. So, Ctrl+Shift+I decreases now the indentation by the amount of the tab width(which can be set in the preferences dialog).
Thanks for reporting.
I've added SVN code to remove the indent spaces when pressing backspace when spaces are used for indentation, as I think this is more what the user would expect. Are there any important cases where this is a problem?
Regards, Nick
On 5/9/07, Nick Treleaven nick.treleaven@btinternet.com wrote:
I've added SVN code to remove the indent spaces when pressing backspace when spaces are used for indentation, as I think this is more what the user would expect. Are there any important cases where this is a problem?
Works great for me so far. Thanks a bunch Nick. Very nice feature.
---John