Skip to content

Instantly share code, notes, and snippets.

@vaporwavie
Last active June 28, 2021 11:58
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 vaporwavie/c1f0932d6cb8708bf0042a2c1ce3cb6e to your computer and use it in GitHub Desktop.
Save vaporwavie/c1f0932d6cb8708bf0042a2c1ce3cb6e to your computer and use it in GitHub Desktop.
some stuff I often use and forget (lol)

Navigating through files

:bf            # Go to first file.
:bl            # Go to last file
:bn            # Go to next file.
:bp            # Go to previous file.
:bw            # Close file.

Navigating within a file

CTRL + F      # PgDn
CTRL + B      # PgUp
Z             # Center editor based on the active line
ZZ            # Zalva e zai

Opening NERDTREE

  • insert nmap <F6> :NERDTreeToggle<CR> on .vimrc
  • save and then you'll be able to invoke it by pressing F6

Go-to Definition

gD            # go-to in global context
gd            # go-to in scope

Onivim 2

gcc           # comments a line
gc            # comments in motion

Misc

u            # Lowercases a letter while on Visual Mode
U            # Uppercases a letter while on Visual Mode
A            # insert at the end of line
I            # insert at the beggining of line 
ggVG         # Visual blocks/selects the entire file 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment