Skip to content

Instantly share code, notes, and snippets.

@Beyarz
Last active August 9, 2021 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Beyarz/0d0fce1b9351e659ffae49f3685130ea to your computer and use it in GitHub Desktop.
Save Beyarz/0d0fce1b9351e659ffae49f3685130ea to your computer and use it in GitHub Desktop.
vi notes

Shortcuts

i - write
o - write newline
D - remove end of line
dd - remove current line
/ - find next string
? - find previous string
yy - copy (yank)
p - paste
NUMBER && yy && p - copy NUMBer of lines from cursor and under and then paste it

Commands

:w - save
:q - exit
:q! - exit and ignore change
:set number - show line numbers
:syntax on - shows syntax

Remove indentation

"In Vim in Linux you can unindent multiple lines by using V to select your first line. Press the down arrow to select multiple lines. Then type < to unindent all of the lines.

If you want to indent, type > instead"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment