Moving lines UP/DOWN shortcut. |
|
Is there shortcut for moving lines UP/DOWN?
for example, eclipse shortcuts: Alt + UP_arrow Alt + DOWN_arrow |
||||||||||||
|
updown lines |
|
that would be greate if I could write integration script for this.
I've tried example scripts there http://www.nusphere.com/kb/technicalfaq/tip_some_useful_scripts.htm. But how can I get current position of cursor in my integration script? |
||||||||||||
|
Guru master
|
Moving lines up and down in PhpED can be done with AutoHotKey (www dot autohotkey dot com)
This script will do it:
This script could do with being made a bit more robust (such as ensuring you are at least in PhpED), but it works fine and the script might also be valid for other applications. I'm fairly sure that AutoHotKey can even check if you are in a PhpED editing window. If people ask about that, then I will have a look. Bear in mind that PhpED defines Alt+Up and Alt+Down to move between editing windows, but AutoHotKey will over-ride that. You can use ^Down and ^Up to specify control key instead of Alt key. |
||||||||||||||
|
|
The previous script wasn't work for me in phped, so I took 2h to learn script and wrote another wich work only in phped and preserves clipboard.
The key control are Crtl + Shit + Arrow Up, Crtl + Shit + Arrow Down. Here it is :
You have to : - install autoHotKey (Thanks to plugnplay introducing me to this excellent automation software ) - save the code in a file named phpEdLineMover.ahk - double click on it Hope it will be usefull to some peoples Ps: I asked this feature in "feature request" for a looong time, maybe if you post your interrest in this post http://forum.nusphere.com/move-a-line-up-and-down-between-others-t7351.html nusphere will implement it. |
||||||||||||||
|
up\down |
|
Thanks xaff and plugnplay.
It will be much better, if developers of phpEd implement this feature. Because even last script is quite buggy. |
||||||||||||
|
|
I don't know how to improve script to workaround the buggy case because I need to go on the start of a line, but the home touch is a switch in phpEd (start of line / start of first word), so I dont know if I'm at start or not....
Anyway here is a new version with key redirection for others programs (ex : notepad++) and phped launching (you have to change the path if needed).
|
||||||||||||||
|
|
Another update less buggy than two before (found a "way" for where the cursor is)
It still move only one line (because I can't know if lines are over lined) Hope one day it will be native, because it's so usefull to organise code or just move a comment.
|
||||||||||||||
|
|
Here is my feature request. Can you guys +1 it, maybe Dmitri will hear our cry:
http://forum.nusphere.com/text-editing-moving-lines-or-highlighted-blocks-up-d-t8895.html |
||||||||||||
|
Moving lines UP/DOWN shortcut. |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by