Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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