601.229 (S24): 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?
- Speed: You will edit text fast.
- Understanding: You will learn how text editors (and IDEs) work.
- Efficiency: Startup time will be measured in milliseconds.
- 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
- Your terminal is required to use a Nerd Font. If you can’t make up your mind, use
JetbrainsMono Nerd Font
- run
git clone https://github.com/ishme-al/csf-vim ~/.config/nvim --depth 1 && nvim
Post-Install (optional)
- Install ripgrep for additional functionality
-
in your
~/.bashrc
alias vim='nvim'
-
If you prefer spaces instead of tabs, in
~/.config/nvim/lua/custom/init.lua
delete this linevim.opt.expandtab=false
- If you prefer 2 spaces for a tab, delete the file.
Learning Neovim
- vim motions:
vimtutor
in ugrad will bring up a tutorial <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
- Colors may be broken.
:checkhealth
in Neovim to see if there are any issues. Any decent terminal emulator should support proper colors (iTerm2, Windows Terminal) - Clipboard may not work
Future Steps (for you)
- Learn Lua (used to configure Neovim)
- Learn how to configure NvChad
- Ditch NvChad! Configure everything yourself.
- Learn Tmux
- Learn Emacs?