Quote:
Originally Posted by macropod
A command to duplicate a line (which there isn't) would likely take as many or more keystrokes to implement as a simple copy/paste.
|
Not sure if I agree on the number of keystrokes... I tried to make a VBA macro to automate the keystrokes needed for duplicating a line and then commenting-out the top copy. Apparently VBA macros can't run inside the editor, so I made one with the awesome and opensource AutoHotkey Windows scripting language. Code is below.
WARNING -- NOT VBA CODE!
Code:
SetTitleMatchMode, 2 ; Win titles must contain specified string.
#ifWinActive, Microsoft Visual Basic for Applications
!c:: ;Alt-c activates it, but only in VBA Editor
send {End}
send +{Home} ;shift+home
send ^c ;copy
send '^v ;apostrophe, paste
send {Enter}
send ^v ;paste
return
#ifWinActive