Skip to content

Instantly share code, notes, and snippets.

@DAddYE
Last active February 21, 2024 11:41
Show Gist options
  • Save DAddYE/50b735e20a017c8ce533 to your computer and use it in GitHub Desktop.
Save DAddYE/50b735e20a017c8ce533 to your computer and use it in GitHub Desktop.
Shortcuts that I tend to forget.

CtrlP

<F5>  " to purge the cache for the current directory to get new files, remove deleted files and apply new ignore options.
<c-f> " and `<c-b>` to cycle between modes.
<c-d> " to switch to filename only search instead of full path.
<c-r> " to switch to regexp mode.
<c-t> " or `<c-v>`, `<c-x>` to open the selected entry in a new tab or in a new split.
<c-z> " to mark/unmark multiple files and `<c-o>` to open them.

Go

<Leader>s  " go implements
<Leader>i  " go info
<Leader>e  " go rename

<Leader>gd " go doc
<Leader>gv " go doc vertical
<Leader>gb " go doc browser

<Leader>gt " go def
<Leader>dv " go def vertical
<Leader>ds " go def split

Custom

<leader>gc :!git add . && git commit -a && git push<CR>
<Leader>zz :ZoomWin<CR>

<Leader>gs :Gstatus<CR>
<Leader>gd :Gdiff<CR>
<Leader>gp :Git push<CR>

<Leader>rr :redraw! \| :NERDTree<CR>
<Leader>cc :nohlsearch<CR>

<Leader>tt :NERDTreeToggle<CR>
<Leader>ff :NERDTreeFind<CR>

<Leader>tb :TagbarToggle<CR>

<Leader>ff ggVG=         " format the entire file
<Leader>i :set list!<CR> " toggle [i]nvisible characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment