CTRL-A / HOME : Move to the beginning of a line.
Control+A: Move to the beginning of the line (more here: How to find End and Home on a Mac keyboard) Control+E: Move to the end of a line or paragraph. Control+F: Move forward one character. Control+B: Move backward one character.
To move from beginning to end of the file It is the quickest way to get or drag your cursor to the first or last line of the file by using the VScode shortcut. For mac: Control+Home to go to home and Control+End to go to the end. For Windows: Ctrl+home to go to home and Ctrl+End to go to the end.
Moving the CursorEnd – Move cursor to end of current line. Ctrl+Home – Move cursor to top of the text entry field. Ctrl+End – Move cursor to bottom of the text entry field.
fn + shift + leftArrow = goto beginning of line
fn + shift + rightArrow = goto end of line
these work for me
In the latest Mac OS You can use shift
+ home
or shift
+ end
I use a handy app called Karabiner to do this, and many other things. It's free and open source.
It's a keyboard remapper, with a lot of handy presets for many common remaps that people may want to do.
As you can see from the screenshot, this remap is included as a preset in Karabiner.
Hope this helps. Happy remapping!
As setup in the terminal using vi
:
The Home
button on a Macbook Pro keyboard: Fn + Left Arrow
.
The End
button on a Macbook Pro keyboard: Fn + Right Arrow
.
Here I found a tweak for this, without any third party tool. This will make the following shortcut to work:
fn + right: to go to the end of the line.
fn + left: to go to the beginning of the line.
cmd + ,
).And add a new entry as following.
That's all. Now close and check.
Hope it helps.
EDIT: Refer to the comment by @Maurice Gilden below for more insights.
For iterm2:
Go to Profiles / Open Profiles / Keys
Set Cmd + left_arrow_key
to Send Hex Code 001
Set Cmd + right_arrow_key
to Send Hex Code 005
This allows you to use Cmd + arrow_keys
to move from beginning to end of the line.
I am not sure if this will work for you (I still use OS 10.8
), but these work for my terminal:
home = move cursor to the start of the line
shift+end = move cursor to the end of the line
alt+leftArrow = move one "word" to the left
alt+rightArrow = move one "word" to the right
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With