On Thu, 27 Aug 2009 01:58:28 +1000, Andrew wrote:
Hey,
this is a somehwat different topic, so I broke up the thread.
would it be possible to have either a different strip command or some switch somewhere so that strip trailing whitespace results in this (using . for spaces/tabs):
for i in (@blah){ ...print "$i\n"; ... ...print "BLAH!\n"; }
Instead of this:
for i in (@blah){ ...print "$i\n";
...print "BLAH!\n"; }
Note that in the first the spaces/tabs are left to end at the current indent level, I suspect that there is a large amount of extra code to make this work as the strip will have to get clever and understand about a lot more things than it currently does.
I see what you mean, I just wonder why?
:)
Regards, Enrico
On Wed, 26 Aug 2009 20:42:50 +0200, Enrico wrote:
On Thu, 27 Aug 2009 01:58:28 +1000, Andrew wrote:
Hey,
this is a somehwat different topic, so I broke up the thread.
And I forgot to update the subject, sorry.
Regards, Enrico
2009/8/27 Enrico Tröger enrico.troeger@uvena.de:
I see what you mean, I just wonder why?
In my case it helps me visually break code into blocks. Either that or it's just habit!
a
On Thu, 27 Aug 2009 11:44:02 +1000, Andrew wrote:
2009/8/27 Enrico Tröger enrico.troeger@uvena.de:
I see what you mean, I just wonder why?
In my case it helps me visually break code into blocks. Either that or it's just habit!
Hmm, ok. Though not sure whether to do this...adding another option for this seems a bit much. Other opinions?
Regards, Enrico
On Sat, 29 Aug 2009 12:30:31 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
On Thu, 27 Aug 2009 11:44:02 +1000, Andrew wrote:
2009/8/27 Enrico Tröger enrico.troeger@uvena.de:
I see what you mean, I just wonder why?
In my case it helps me visually break code into blocks. Either that or it's just habit!
Hmm, ok. Though not sure whether to do this...adding another option for this seems a bit much. Other opinions?
Personally I don't see any big advantage of this function as this is similar on putting the cursor to end of line above and hitting return.
Cheers, Frank
On Wed, 26 Aug 2009 20:42:50 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
for i in (@blah){ ...print "$i\n"; ... ...print "BLAH!\n"; }
Instead of this:
for i in (@blah){ ...print "$i\n";
...print "BLAH!\n"; }
Note that in the first the spaces/tabs are left to end at the current indent level, I suspect that there is a large amount of extra code to make this work as the strip will have to get clever and understand about a lot more things than it currently does.
I see what you mean, I just wonder why?
I think this is useful as the user doesn't need to re-indent the blank line before typing on it.
Regards, Nick
On Mon, 31 Aug 2009 15:49:06 +0100, Nick wrote:
On Wed, 26 Aug 2009 20:42:50 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
for i in (@blah){ ...print "$i\n"; ... ...print "BLAH!\n"; }
Instead of this:
for i in (@blah){ ...print "$i\n";
...print "BLAH!\n"; }
Note that in the first the spaces/tabs are left to end at the current indent level, I suspect that there is a large amount of extra code to make this work as the strip will have to get clever and understand about a lot more things than it currently does.
I see what you mean, I just wonder why?
I think this is useful as the user doesn't need to re-indent the blank line before typing on it.
Hmm, I usually use the Up cursor key to jump to the previous line and then press Enter :).
Regards, Enrico
On Tue, 1 Sep 2009 20:58:45 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
I think this is useful as the user doesn't need to re-indent the blank line before typing on it.
Hmm, I usually use the Up cursor key to jump to the previous line and then press Enter :).
Yes, but sometimes the cursor will be at the start of the line after pressing up, so then the user also has to press End and then Enter.
Anyway, I'm not that bothered about implementing it really, just that it could be useful.
Regards, Nick
Nick Treleaven wrote:
On Tue, 1 Sep 2009 20:58:45 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
I think this is useful as the user doesn't need to re-indent the blank line before typing on it.
Hmm, I usually use the Up cursor key to jump to the previous line and then press Enter :).
Yes, but sometimes the cursor will be at the start of the line after pressing up, so then the user also has to press End and then Enter.
Anyway, I'm not that bothered about implementing it really, just that it could be useful.
Pressing Up, End and Enter every time is so annoying... For example, to add a simple C/C++ code block (I prefer K&R style, opening brace on the same line) I have to press
<space>{<enter>}<up><end><enter>
Currently I created a code snippet, but
<space>${snippet_name}${insert_snippet_shortcut}
is not yet comfortable. I'm still looking for a better solution (shortcuts for particular snippet or macro recording should be fine...). I wonder, what other IDEs offer for this.
On Thu, 03 Sep 2009 22:44:37 +0400 Eugene Arshinov earshinov@gmail.com wrote:
I think this is useful as the user doesn't need to re-indent the blank line before typing on it.
Hmm, I usually use the Up cursor key to jump to the previous line and then press Enter :).
Yes, but sometimes the cursor will be at the start of the line after pressing up, so then the user also has to press End and then Enter.
Anyway, I'm not that bothered about implementing it really, just that it could be useful.
Pressing Up, End and Enter every time is so annoying... For example, to add a simple C/C++ code block (I prefer K&R style, opening brace on the same line) I have to press
<space>{<enter>}<up><end><enter>
Personally I have a snippet: b={\n\t%cursor%\n%brace_close%
Which inserts a matching brace pair - braces at the same column, but could be adapted to what you want.
But this is only a workaround - if you want to write a patch we might accept it.
Regards, Nick
On Thu, 10 Sep 2009 15:50:52 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
On Thu, 03 Sep 2009 22:44:37 +0400 Eugene Arshinov earshinov@gmail.com wrote:
I think this is useful as the user doesn't need to re-indent the blank line before typing on it.
Hmm, I usually use the Up cursor key to jump to the previous line and then press Enter :).
Yes, but sometimes the cursor will be at the start of the line after pressing up, so then the user also has to press End and then Enter.
Anyway, I'm not that bothered about implementing it really, just that it could be useful.
Pressing Up, End and Enter every time is so annoying... For example, to add a simple C/C++ code block (I prefer K&R style, opening brace on the same line) I have to press
<space>{<enter>}<up><end><enter>
Personally I have a snippet: b={\n\t%cursor%\n%brace_close%
Which inserts a matching brace pair - braces at the same column, but could be adapted to what you want.
But this is only a workaround - if you want to write a patch we might accept it.
Regards, Nick _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On Thu, 10 Sep 2009 15:50:52 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
On Thu, 03 Sep 2009 22:44:37 +0400 Eugene Arshinov earshinov@gmail.com wrote:
I think this is useful as the user doesn't need to re-indent the blank line before typing on it.
Hmm, I usually use the Up cursor key to jump to the previous line and then press Enter :).
Yes, but sometimes the cursor will be at the start of the line after pressing up, so then the user also has to press End and then Enter.
Anyway, I'm not that bothered about implementing it really, just that it could be useful.
Pressing Up, End and Enter every time is so annoying... For example, to add a simple C/C++ code block (I prefer K&R style, opening brace on the same line) I have to press
<space>{<enter>}<up><end><enter>
Personally I have a snippet: b={\n\t%cursor%\n%brace_close%
Which inserts a matching brace pair - braces at the same column, but could be adapted to what you want.
But this is only a workaround - if you want to write a patch we might accept it.
Sorry, sent previous email without reply :-/
The trouble is that I do not know the way how this block insertion should be implemented. What my patch should do?
On Sun, 13 Sep 2009 00:30:51 +0400 Eugene Arshinov earshinov@gmail.com wrote:
Pressing Up, End and Enter every time is so annoying... For example, to add a simple C/C++ code block (I prefer K&R style, opening brace on the same line) I have to press
<space>{<enter>}<up><end><enter>
Personally I have a snippet: b={\n\t%cursor%\n%brace_close%
Which inserts a matching brace pair - braces at the same column, but could be adapted to what you want.
But this is only a workaround - if you want to write a patch we might accept it.
Sorry, sent previous email without reply :-/
The trouble is that I do not know the way how this block insertion should be implemented. What my patch should do?
Not sure really. Maybe it's OK for you to just use the snippet (I think it also works with your brace-alignment style).
Regards, Nick
Hmm, I usually use the Up cursor key to jump to the previous line and then press Enter :).
Yes, but sometimes the cursor will be at the start of the line after pressing up, so then the user also has to press End and then Enter.
That's sort of the crux of it and is the reason what I don't have strip trailing spaces on. For me the simple fix is instead of having the strip feature strip to an indent is to only strip trailing space from lines that have a character in them.
ie (in perl parlance):
foreach (<LINE>){
$_ =~ s/(\S+)\ +$/$1/;
}
At least I think that RE is right, I haven't checked.. :)
a