Swap all lines in block (First to Last, second first to second last,...)

Started by Stefan, October 01, 2009, 10:14:26 AM

Previous topic - Next topic

Stefan

Missing feature: "Edit > Line > Transpose all lines in block"
to put first line down as last line, second first down as second last, and so on...


One example:
Swap all lines from:
1 Create Folder xxxx yyyyy zzzz bla bla bla
2 Copy File xxxx yyyyy zzzz
3 Start App xxxx yyyyy zzzz bla

to:
3 Start App xxxx yyyyy zzzz bla
2 Copy File xxxx yyyyy zzzz
1 Create Folder xxxx yyyyy zzzz  bla bla bla

As start for to modify it to:
1 close App xxxx yyyyy zzzz bla
2 delete File xxxx yyyyy zzzz
3 remove Folder xxxx yyyyy zzzz  bla bla bla


Using the available Sort feature would only help if i would have always digits on start of line.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hi Stefan,

yes, maybe feature is useful (never need something like this :) ) but I think this should not be done as standard functionality. Correct way would be to have it as a script.


Ok, now I see that this can be as extension request for existing transpose lines command, when multi line selection exist. Then I can place this in my to do.
I just do not want to introduce new formatting functionality, if it is not possible to do with coming scripting.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

Quote from: alex on October 01, 2009, 04:39:39 PM
this can be as extension request for existing transpose lines command, when multi line selection exist.

Implemented and  works!

Example:

Before:
1 AAAAA First
2 BBBBBBBBB
3 CCCCCCCCC
4 DDDDDDDDD
5 EEEEEEEEE
6 FFFFF Last


Select all those lines (f.ex. by pressing Alt+ArrowDown 3 times)
Press shortcut Ctrl+Alt+T (see "Edit > Line > Transpose")
You will get:
6 FFFFF Last
5 EEEEEEEEE
4 DDDDDDDDD
3 CCCCCCCCC
2 BBBBBBBBB
1 AAAAA First


Thank you Alex.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Stefan

Great!

I just had the need for such tool
and HippoEDIT helps me out again!


Many thanks Alex for an very good editor  :)


--------------------------

My solved Problem was:

I want to reorder this paragraphs upside-down

FROM: (oldest on top)
QuoteReNamer 5.50+ Beta 28 - ~23.05.2010
* Added option to reset serialization index every N files;

ReNamer 5.50+ Beta 29 - 30.05.2010
* Added BoolToStr function to PascalScript;

ReNamer 5.50+ Beta 31
* Selected file names will be loaded into newly added Remove and Replace
 rules as sample text (experimental, may be removed later);

ReNamer 5.50+ Beta 32 - 05.06.2010
* Fixed incorrectly used counter for the display of hourglass icon,
 which caused the hourglass icon to appear indefinitely;



TO: (newest on top)
QuoteReNamer 5.50+ Beta 32 - 05.06.2010
* Fixed incorrectly used counter for the display of hourglass icon,
 which caused the hourglass icon to appear indefinitely;

ReNamer 5.50+ Beta 31
* Selected file names will be loaded into newly added Remove and Replace
 rules as sample text (experimental, may be removed later);

ReNamer 5.50+ Beta 29 - 30.05.2010
* Added BoolToStr function to PascalScript;

ReNamer 5.50+ Beta 28 - ~23.05.2010
* Added option to reset serialization index every N files;



SO i just selected the whole document and pressed Ctrl+Alt+T  (Menu "Edit > Line > Transpose)
and got the work half done.

Because i got (newest on top but lines transposed too):
Quotewhich caused the hourglass icon to appear indefinitely;
* Fixed incorrectly used counter for the display of hourglass icon,
ReNamer 5.50+ Beta 32 - 05.06.2010

 rules as sample text (experimental, may be removed later);
* Selected file names will be loaded into newly added Remove and Replace
ReNamer 5.50+ Beta 31

* Added BoolToStr function to PascalScript;
ReNamer 5.50+ Beta 29 - 30.05.2010

* Added option to reset serialization index every N files;
ReNamer 5.50+ Beta 28 - ~23.05.2010

first "only".

But no matter... i just selected each paragraph at its own and executed Ctrl+Alt+T again.


-----------------

Question:
i can imagine to be able to write an script (or an macro would be enough) to do this all in one step,
...but...
maybe there could be an option to transpose only whole paragraphs
if they are detected in selection
and not each lines within the paragraphs too.
Like holding Shift-Key while pressing the menu item, - or an ini tweak, - or an setting.

Just an idea.... i can life with it how its now... and will provide an script later...
...but as always my way of thinking is to provide the user all aid i can give him (because most didn't had an idea how to find an workaround).

OTOH i know you want to KISS...
but anyway i A) wanna provide this solution, B) say thank you Alex!  C) and try my luck! ;D



-


Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-