vimrc
to make nvim look like this:
or this with skinnyvimrc
(use if you don't want to install a separate theme/font)
- Copy this vimrc
cp skinnyvimrc ~/.vimrc
orcp vimrc ~/.vimrc
- Open
vim
and install plugs::PlugInstall
- Source:
:source ~/.vimrc
- Install
:ag
search:apt-get install silversearcher-ag
orbrew install the_silver_searcher
- For autocomplete, install YouCompleteMe (needs root)
the Linux instructions lie, use:cd ~/.vim/plugged/YouCompleteMe python3 install.py --all
- Set Nord in iterm theme (install here for Terminal)
- Download Inconsolata Nerd Font and set as terminal font for nice ligatures and icons
my fav vim commands
Ctrl+P
: Search for file name<space>l
: Search for file name in same directory as this file<space>ag
: Search for word under cursor across all files in directory:Ag stringIWantToSearchFor
: Search for word across all files in directory
[Ctrl+N]
Show files with NERDTree<space>pr
Format file
LSP (Language Server Protocol) - shows errors/warnings, definitions, etc as you type like VSCode would
:LspInstallServer
Install language server for currently opened file's language (you might need additional installs)- See vim-lsp for commands
Install nvim (for universal linux):
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
./nvim.appimage
Copy the nvim
folder to ~/.config/nvim
. This contains lazy.nvim configs. see https://www.lazyvim.org/ for more info
cp -r nvim ~/.config/nvim
Install ripgrep for search (something was weird with ag): sudo apt-get install ripgrep
or brew install ripgrep
The apt install neovim is really old so we have to build from source:
Install lua: sudo apt install lua5.3
- install ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
andcp zshrc ~/.zshrc
- Good Ubuntu theme: budgie arc-dark with mcmojave-circle-pink
- for rust, remember to install rustfmt apt install rustfmt or something otherwise neoformat doesn't work