 Nux
Member
|
Hi. I’ve been playing a lot with rectangular selection lately (best programming discovery of a year for me ). There is one this I miss though – strafing selection (moving to the right/left). For me this is especially useful when I have a long cursor (0-lenght selection through few lines) and want to edit few lines at once in two or more places.
So I’ve made this script:
http://pastebin.com/gCyhCmr9
But I’m wondering if this is bundled in PN2? Also I’m looking for a feedback of what do you think should happen when you reach right/left edge? Should it behave differently in normal and rectangular selection mode?
|
 simon
Key Master
|
Nice script, thanks for sharing. I, too, have wanted to do this so it seems like a good candidate for inclusion in the core. I added an enhancement request for this:
http://code.google.com/p/pnotepad/issues/detail?id=1366
Also you might want to add to scriptshare:
http://scriptshare.rocketmonkeys.com/
|
 CoDEmanX
Member
|
Great script! Also works in combination with Shift!!
If it reaches the border, it should stop there in my opinion. It currently moves to the previous line (or even out of the text bounds), which might be helpful for certain people. I’d prefer the cursor to stay inside of the original line though.
|
 Nux
Member
|
Script added here (as part of my aligning functions):
http://scriptshare.rocketmonkeys.com/script/34
Had some problems with script share before, I’m glad password reset works now . Also updated other scripts if anyone is interested. Selections is (or I hope it is) particularly useful for learing how to manipulate selections in PN.
|
 Nux
Member
|
I think I’ll make 3 strafing modes for 3 selection modes:
- In singular selection just keep it like it is (move like a snake).
- In rectangular selection move selection beyond text and keep it rectangular (not yet sure if this will work smoothly).
- In multi selection – stop at EOLs (and start of lines).
Would that work for you?
PS: Shift is for running, Alt is for strafing .
|