Vim Setup

A very easy setup for Neovim. Note: This setup will come with LSPs for c, cpp, and lua. For more, you will need to configure on your own.

Why?

  1. Speed: You will edit text fast.
  2. Understanding: You will learn how text editors (and IDEs) work.
  3. Efficiency: Startup time will be measured in milliseconds.
  4. Universal: Almost all machines (you come across) will have vim installed.

Installing Neovim

If you are working on ugrad machines, you can skip this step as Neovim is already installed.

NvChad requires version >= 0.9.0
Follow instruction here

Setting up NvChad

  1. Your terminal is required to use a Nerd Font. If you can’t make up your mind, use JetbrainsMono Nerd Font
  2. run git clone https://github.com/ishme-al/csf-vim ~/.config/nvim --depth 1 && nvim

Post-Install (optional)

  1. Install ripgrep for additional functionality
  2. in your ~/.bashrc

     alias vim='nvim'
    
  3. If you prefer spaces instead of tabs, in ~/.config/nvim/lua/custom/init.lua delete this line

     vim.opt.expandtab=false
    
  4. If you prefer 2 spaces for a tab, delete the file.

Learning Neovim

  1. vim motions: vimtutor in ugrad will bring up a tutorial
  2. <space> + ch in Neovim will bring up a cheatsheet (<leader> is by default mapped to the space key)

Issues?

Any set of these instructions may break. If you do face any issues (or just want to talk about vim) let me know at imeal1@jh.edu

Future Steps (for you)