0
votes

A task I use multiple times a minute is to select command lines from my do-files and execute them.

The shortcut for this function in previous versions of Stata was Ctrl+Shift+Up/Down arrow. I used to use Stata 10 and now that I've upgraded to Stata 11, the keystroke sequence described in the previous sentence does nothing. I'm limited to Ctrl+Shift+Left/Right arrows, which is painstakingly slow.

2
Go to the start of the line (with Home key) and then shift + up/down. That works for me.Roberto Ferrer

2 Answers

1
votes

Go to the start of the line (with the Home key) and then Shift+Up/Down.

Credit:
The comment by Roberto Ferrer

0
votes

I automate the selecting of line and exectuting the command with the following autohotkey script.:

^+Enter::Send {Control down}l{Control up}{pause}^d{down}{Home}

Return

Above is assigned to Ctrl + Shift + Enter, but it could be any keyboard combination. I usually use Ctrl + Ö or Ctrl + Ä since I use a scandinavian keyboard.

Same code as above but assigned to Ctrl + Ö:

^ö::Send {Control down}l{Control up}{pause}^d{down}{Home}

Return

If you prefer having the cursor at the end of the next line after executing, replace {Home} with {End}