SNS
Table of contents
VI
- = Text Editor
Shortcuts!
- Start of line vervus EOL / End of line :
- End of line (EOL)
$org_: Jumps to (second to) last char of the current line$: Jumps to TRUE ENDING of current lineg_: Jumps to last non-blank of current lineA: Jumps to EOL, End of char and append immediate by starting to insert
- Start of line (SOL)
0or^: Jumps to first char of the current line0: Jumps to TRUE BEGINNING of current line^: Jumps to first non-blank of current line
- TL;DR –>
0<^<g_<$ - Or with a diagram
[ ] [ ] [ ] [ ] [d] [e] [f] [ ] [m] [y] [_] [f] [u] [n] [c] [ ] [ ] [ ] ↑ ↑ ↑ ↑ 0 ^ g_ $ (Col 1) (First Text) (Last Text) (Absolute End)
- End of line (EOL)
- Under insert mode, if you wish to add to the last line:
- Insert Mode –>
Ctrl + o–>$ - Note:
Ctrl+oallows user to temp switch over to normal mode for one single command only
- Insert Mode –>
Top of the file vs the end of the file
- First line of file (you have 4 options, they’re all doing the same thing)
gg= first line onlygg0= first line + FOL !!!:1= first line only1Gwith explicit number 1
- Last line in file (you have 2 options)
:$last line only last entryGlast line only first entryG$last line + EOL !! (Best optionGG$)
- TL:DR –>
gg0<gg<G<G$
- First line of file (you have 4 options, they’re all doing the same thing)