Skip to content

Instantly share code, notes, and snippets.

@rnmp
Last active April 8, 2020 15:36
Show Gist options
  • Save rnmp/11d9e02ffceb055062d726a0c7ae2e9f to your computer and use it in GitHub Desktop.
Save rnmp/11d9e02ffceb055062d726a0c7ae2e9f to your computer and use it in GitHub Desktop.
Vim: The Guide

Why I switched?

  1. VSCode can get so fucking slow sometimes
  2. VSCode-like tooling is available for vim (typescript autoimport, autofixes, etc): E.g. https://github.com/neoclide/coc-tsserver
  3. Vim has way better navigational features built-in: you can move a lot faster in a file once you get used to the commands. More on that later.

How to get started?

  1. Get familiar with vim commands: Run vimtutor on your terminal
  2. Download a decent terminal app if you haven’t already. A lot of people use iTerm2, I prefer Kitty (way faster): https://sw.kovidgoyal.net/kitty/
  3. Install NeoVim
  4. Be prepared to google things you want in vim and add them to your vimconfig, I can’t tell you which ones you should get bc that’s kinda up to you and you should understand which ones work for you, but here’s mine (very messy): https://github.com/rnmp/dotfiles/blob/master/.config/nvim/init.vim

Good plugins

  1. VimPlug which makes it easier to install new plugins.
  2. COC, it’s an autocompletion and suggestions system that will allow you to have shit like intellisense (typescript) in VSCode.
  3. NERDTree gives you a sidebar with your files that you can toggle.
  4. Ctrl-P which allows you to search for files and open them with fuzzy search, I personally don’t use it but it’s simpler to get started than the one I use.

Cool shortcuts/commands

Command/shortcut Description
ctrl+u Scroll half page up
ctrl+d Scroll half page down
ciw Change inside word
ci( Change inside parenthesis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment