Equipping TeXworks with a ‚duplicate this line‘ feature / Zeilen duplizieren in TeXworks

I really like TeXworks but miss some of the functions other editors provide. Notepad++ for example has a nice „duplicate this line“ feature available via Ctrl+D that I’d like to use in TeXworks as well. Thanks to Autohotkey this is quite simple (also thanks to the posting from www.autohotkey.com/board/topic/19002-duplicate-line/)

^d::
SetKeyDelay, -1
Temp := ClipboardAll
Clipboard = 
Send {home}
Send {Shift}+{End}^c
ClipWait, 2
Send {End}{Enter}
SendRaw %Clipboard%
Clipboard := Temp
return

PS: I guess TeXworks can do this via the built-in scripting but I never played with that. If one of my readers has a proposal, please send it to me.

Uwe

Uwe Ziegenhagen mag LaTeX und Python, auch gern in Kombination. Hat Dir dieser Beitrag geholfen und möchtest Du Dich dafür bedanken? Dann unterstütze doch vielleicht die Dingfabrik Köln e.V. mit einem kleinen Beitrag. Details zur Bezahlung findest Du unter Spenden für die Dingfabrik.

More Posts - Website