Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 1.32 KB

CHEATSHEET.md

File metadata and controls

46 lines (38 loc) · 1.32 KB

Vim Cheatsheet

Disclaimer: This cheatsheet is summarized from personal experience and other online tutorials. It should not be considered as an official advice.

Shortcut

Whole file indentation

gg=G

Select the current word and apply it to a console command. e.g. echo

nnoremap <C-E> viwy:!echo <C-R>"<CR>

Plugin Shortcut

<Leader> + d     # Use YDict to look up dictionary for translation
<Leader> + k     # Use Dasht to look up APIs

Vim 101: QuickFix and Grep QuickFix commands:

:copen           # Open the quickfix window
:cn              # Go to the next location in the list
:cp              # Go to the previous location
:ccl OR :cclose  # Close the quickfix window

For QuickFix window in ack.vim:

?    a quick summary of these keys, repeat to close
o    to open (same as Enter)
O    to open and close the quickfix window
go   to preview file, open but maintain focus on ack.vim results
t    to open in new tab
T    to open in new tab without moving to it
h    to open in horizontal split
H    to open in horizontal split, keeping focus on the results
v    to open in vertical split
gv   to open in vertical split, keeping focus on the results
q    to close the quickfix window