In the IDE, we've got Ctrl+Y to delete current line at cursor, with MMX we can Ctrl+X to cut current identifier at cursor. But I also want a shortcut to cut current line at cursor, any help?
Jeroen Wiert Pluimers That I know. Maybe I wasn't clear enough, but what I'm looking for is a single shortcut that does the job. Anyways, you inspired me to record an editor macro, but I don't know why Ctrl+Shift+P to play the macro failed - in my XE 4 IDE, it only cuts to the end of the line, but not the whole line...
Edwin Yip that's odd. I use keyboard macros all the time and they always replay exactly what I recorded. Btw. do you know about the keyboard macro manager in GExperts?
Actually, it shouldn't be too difficult to write an expert, that changes Ctrl+Y to cut the line rather than deleting it. I'll have to think about it. OTOH such a tool probably already exists.
Daniela Osterhagen Tried again, it's the same problem, and the macro manager in GExperts and the same problem with the same macro in question. OTOH, if it worked and if the macro manager allow assigning shortcut, it'll be what I want.
You could try AutoHotkey with a remapping like this:
#IfWinActive ahk_class of Delphi IDE ^y:: Send, ^z ; undo delete Send, {End}{Shift down}{HOME}{Shift Up} ; select the current line Send, ^x ; cut the current line return
Where you need to add the ahk_Class of Delphi. It might work.
Thomas Mueller Great! Thanks for the example code. I have heard AutoHotKey long time ago, but haven't had a chance to try it yet, I hope it is as lightweight as I wish...
Home, Shift-Down, Ctrl-X
ReplyDeleteJeroen Wiert Pluimers That I know. Maybe I wasn't clear enough, but what I'm looking for is a single shortcut that does the job. Anyways, you inspired me to record an editor macro, but I don't know why Ctrl+Shift+P to play the macro failed - in my XE 4 IDE, it only cuts to the end of the line, but not the whole line...
ReplyDeleteEdwin Yip that's odd. I use keyboard macros all the time and they always replay exactly what I recorded. Btw. do you know about the keyboard macro manager in GExperts?
ReplyDeleteActually, it shouldn't be too difficult to write an expert, that changes Ctrl+Y to cut the line rather than deleting it. I'll have to think about it. OTOH such a tool probably already exists.
ReplyDeleteDaniela Osterhagen Tried again, it's the same problem, and the macro manager in GExperts and the same problem with the same macro in question. OTOH, if it worked and if the macro manager allow assigning shortcut, it'll be what I want.
ReplyDeleteThomas Mueller I have done some google search before posting this, no such a tool that I am know of.
ReplyDeleteYou could try AutoHotkey with a remapping like this:
ReplyDelete#IfWinActive ahk_class of Delphi IDE
^y::
Send, ^z ; undo delete
Send, {End}{Shift down}{HOME}{Shift Up} ; select the current line
Send, ^x ; cut the current line
return
Where you need to add the ahk_Class of Delphi. It might work.
Thomas Mueller Great! Thanks for the example code. I have heard AutoHotKey long time ago, but haven't had a chance to try it yet, I hope it is as lightweight as I wish...
ReplyDelete