Skip to content

Instantly share code, notes, and snippets.

@malwaremily
Last active September 26, 2021 04:59
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 malwaremily/10f460815ebdeb4b49f46bb01877e5a0 to your computer and use it in GitHub Desktop.
Save malwaremily/10f460815ebdeb4b49f46bb01877e5a0 to your computer and use it in GitHub Desktop.
Vim Cheatsheet

MODIFY FILE

Find all foo and replace with bar

:%s/foo/bar/g

COPY A LINE TO ANOTHER LINE

yy - Copy line into buffer

p - Paste the line someplace else

OPEN/CLOSE VIM FOLDS

zo - to open a single fold under the cursor.

zc - to close the fold under the cursor.

zR - to open all folds.

zM - to close all folds.


VIMRC CONFIG HELP LOOKUP

:help <command> - Read more about a configuration setting

VIMRC CONFIG TUTORIAL & REFERENCE ARTICLES

vimrc Configuration Guide: https://www.freecodecamp.org/news/vimrc-configuration-guide-customize-your-vim-editor/

Using Vim for Go Development: https://dev.to/jogendra/using-vim-for-go-development-5hc6

Vim-Go Plugin: https://github.com/fatih/vim-go

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