Skip to content

Instantly share code, notes, and snippets.

@maheshj01
Last active August 21, 2022 17:18
Show Gist options
  • Save maheshj01/e02aeda43892846ad7f4be8e0a57bccc to your computer and use it in GitHub Desktop.
Save maheshj01/e02aeda43892846ad7f4be8e0a57bccc to your computer and use it in GitHub Desktop.
Vim cheatsheet for beginners, A complete official cheatsheet can be found here https://vim.rtorr.com/

Table of Contents

Navigation

h - move cursor left j - move cursor down k - move cursor up l - move cursor right

e - jump forwards to the end of a word b - jump backwards to the start of a word 0 - jump to the start of the line $ - jump to the end of the line

Install vim plugins

  1. Install vim-plug so that it auto-loads at launch $ curl -fLo ~/.vim/autoload/plug.vim --create-dirs
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

  2. Check if ~/.vimrc file exists $ ls -a ~/.vimrc

  3. if previous command error file doesn't exist then create and open file in vim $ vim ~/.vimrc #open file in vim

  4. Paste following text. Example below install emmet call plug#begin() Plug 'mattn/emmet-vim' call plug#end()

  5. Save File using write function :w

  6. Run plugin install prompt :PlugInstall

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