What is the Stata 11 do-file editor shortcut for selecting a command line? - keyboard-shortcuts

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.

Go to the start of the line (with the Home key) and then Shift+Up/Down.
Credit:
The comment by Roberto Ferrer

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}

Related

Snowflake - How to Multi Line Comment

Is there a shortcut for multi line commenting out? A.k.a. commenting blocks of SQL at a time via a shortcut or menu option?
You have to highlight the rows you want to comment out and then press Cmd (Mac) or Crtl (Windows) + /
See here: https://docs.snowflake.com/en/user-guide/ui-worksheet.html
I don't think there's something like multi-line comment in snowflake. Even on the community page: page there's just the shortcut for a single line comment while having the whole thing highlighted, which is:
Press CMD + / (Mac) or CTRL + / (Windows) again. The comments are removed from the highlighted lines.

Google Colab: edit two lines at the same time

In my local jupyter-notebook i can edit mutliple lines of code at the same time: simply press ctrl + click at the respective lines. In google Colab that does not seem to work. Is this feature available somehow?
I work with Firefox on a Ubuntu 16.04.
It's available. Instead of Ctrl + Click, please use
Alt + Click for Windows
Option + Click for MacOS
To select all occurrences of the current selection, please use
Ctrl + Shift + L for Windows
Command + Shift + L for MacOS
(In Linux - Chromium, at least)
I managed to do block select but only on contiguous lines, not multi-cursor unfortunately.
Shift+Alt + Up/Down to select multiple lines.
Now you can release Alt and use Left/Right to move to the sides. Whatever you do now will affect the whole block.
And, if you select one or more lines with Shift (doesn't need to be the whole content, this affects all the lines with cursor), and then release Shift and press Alt+Up/Down, you will move those lines altogether up/down
By Rainer Glüge: On Linux+Firefox:
Block-Select: Ctrl+Shift+Alt+Cursor Keys.
Multi-Cursor: Alt+Click
Multi-Select: Select one occurence, then Ctrl+Shift+L
Simplest way:
You can just press Shift+Ctrl+Up/Down keys.
(Tried with Ubuntu + Google Chrome).
Shift+Alt also works, but I find Shift+Ctrl easier.

Selecting several lines in Intellij using keyboard shortcuts

How can I select several lines in Intellij using keyboard shortcuts?
I found out that I can do it with
ctrl + shift + right/left
But I have to press this buttons several times to select whole line.
What is more the selection starts from current caret position, so if it's not the beginning/end (depending of using left or right arrow) of the line, the whole first line is not selected.
What I usually do is to hit the Home key, and then either:
Shift+End to select until the end of the current line, or
Shift+Down to select until the next line, and then keep pressing Shift+Down to select multiple lines.
Also, IntelliJ IDEA supports the "Extend Selection" and "Shrink Selection" commands, for which the default key bindings are Ctrl+Alt+Left and Ctrl+Alt+Right.
These allow you to select entire blocks of code rather than word by word. You may still need to press the keys multiple times, but way fewer times than when selecting on a word by word basis.

Is there a keyboard shortcut for inserting a new line above the one the caret is on?

I can do command-return to create a new line under the current one, even if the caret is in the middle of a word, but I often find myself wishing there was a similar command for inserting a line above and moving the caret to it. Does that exist?
I know I can type out my new line and then move it, but it'd be nice to skip that.
Yep: ⌘ (Command) + shift + enter if you're on a Mac
Found here

Nano keyboard shortcut to go through line faster?

Is there an shortcut in nano for moving through a line faster? I have some log files with gigantic lines and getting to the middle of them is awful.
I know I could use a different text editor that doesn't have this particular problem (less will wrap lines), but I'm used to nano and I like a lot of its other features.
Here are the shortcuts for moving through a line in nano.
Use these to go faster through a line:
ctrl + space move one word forward in a line.
alt + space move one word backwards in a line.
Other line shortcuts:
ctrl + f move one character forward in a line.
ctrl + b move one character backwards in a line.
ctrl + a move to the beginning of a line.
ctrl + e move to the end of a line
To move to a specific line use ctrl + _.
You may want to check out more Nano Keyboard Commands