What is the shortcut in mac to remove text left to the curser till the start of the line in terminal - keyboard-shortcuts

For instance, I type "aaa bbb" in the terminal and I put my cursor between "aaa" and "bbb". I am pretty sure there is a shortcut to remove "aaa" in one operation anyone know what it is?

On windows is Ctrl + Delete
On Mac it will be Command + Delete

Related

How to send a new line without using `n `r? without an enter

i know that n means "ENTER", but when i'm using n, i dont want to press enter. I just want to put the text in a new line, but what "n" does, it puts in a new line but it also press enter.. i don't want to press enter...
For example
::pergunta::Hello, n How are you? n what are you doing? n bye...
How can i fix that issue?
First, you need to determine what keystrokes your application uses for this purpose, and then you can implement that in Autohotkey.
For example, in Excel, multiple lines of text can be typed into a single cell by pressing ALT-ENTER at the end of each line (instead of ENTER).
So, the following AutoHotkey script would work for Excel:
:X:pergunta::Send, Hello,!{Enter}How are you?!{Enter}what are you doing?!{Enter}bye...
The ":X:" at the beginning means "run a script", which in this case is the "Send" command. The !{Enter} part means ALT-ENTER.
You might also want to use SetKeyDelay to speed up the typing of text:
SetKeyDelay, 0
:X:pergunta::Send, Hello,!{Enter}How are you?!{Enter}what are you doing?!{Enter}bye...

Go to last line in Atom editor

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.

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

TextMate: how to highlight the entire line to copy and paste?

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 🖖