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
Related
I wonder if there is a way to navigate to the last line of the file in atom editor given that you don't it's number(for instance you've just opened log file). Something similar to Shift + G in vim.
It works the same as it does in every other macOS application:
Cmd+↓ jumps to last line (or ⇟ / end on a fullsize keyboard)
Cmd+↑ jumps to first line (or ⇞ / home on a fullsize keyboard)
If it still doesn't work, a third-party package might interfere. You can use the keybinding-resolver (it's bundled with Atom) to find out which package causes this conflict.
ubuntu 20.04
atom 1.50.0
ctrl + end to the file end
ctrl + home to the file head
Use ctrl+a to select all and then press ↑ to go to the top or ↓ to go to the bottom of the file. For the beginning / end of a line try ctrl-← and ctrl-→ or if it doesn't work try the same with shift or alt.
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
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}
In IntelliJ we can do multiline edit at the same position on each line with Alt + Shift + Insert. Can we do multiline edit at the end of each line when the length of each line is different? A usage scenario is for editing semicolon at the end of each line.
Thanks.
This is possible now. Do a multi-line edit starting an any arbitrary column as normal, then press the "END" key and the insertion points will move to the end of each line. Also supported are the HOME, and CTRL + left or right arrow.
I find the control+a and control+e hard to press, and for some reason control+shift+e doesn't seem to highlight the entire line.
I want to copy the line into my clipboard. How do I do this?
To highlight a line in TextMate, Shift+Command+L is what you want.
Command-LeftArrow Shift-DownArrow is one way
Triple-click, then hit ⌘+C to copy.
cmd-leftArrow # to get cursor to beginning of line
shift-cmd-rightArrow # to highlight entire line
cmd-c # copy the line to clipboard
If you want to duplicate a line you can use this shortcut:
Cmd + left arrow to go at the beginning of the line
Ctrl + Shift + D to duplicate the entire line below the one you want to duplicate
Duplicate Line / Selection (⌃⇧D) — this will duplicate the current line, leaving the caret in the same column on the new line, or if there is a selection, duplicate that.
Source: textMate official website
PERSONAL WARNING:
Selecting a word, or whatever, and apply this shortcut will duplicate next to the original one. Not below.
TIPS
If you want to move your new duplicated line or whatever:
Ctrl + Cmd + arrow up will move up
Ctrl + Cmd + arrow down will move down
Happy coding 🖖