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 likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website