The ultimate development setup including just Kitty, Neovim, and tmux.
Kitty + Neovim + tmux Ultimate Setup
Notes
- These instructions were written primarily for Mac but can be translated for Linux and Windows.
- The theme and font used throughout this setup are gruvbox dark 2 and FiraCode Nerd Font 5.
Preparation
- Run
git clone https://github.com/Jrachman/kitty-neovim-tmux-ultimate-setup.git.
Kitty
- Run
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin. 1 - Open Kitty and click on kitty --> Preferences. This should open up a Vim window with Kitty's settings.
- Copy and paste the following to the top of the settings file:
mousehidewait 0
kitty_mod cmd+shift
map kittymod+equal changefont_size all +2.0
map kittymod+minus changefont_size all -2.0
map kittymod+backspace changefont_size all 0
font_family FiraCode Nerd Font Mono
bold_font auto
italic_font auto
bolditalicfont auto
font_size 12.0
macostitlebarcolor background
map alt+left send_text all \x1b\x62
map alt+right send_text all \x1b\x66\
include ./theme.conf map cmd+d new_window
map kittymod+n newos_window
- If you do not want to add a theme, please comment out the
include ./theme.confin your Kitty Preference file. If you do want a theme, run the following in Kitty to add gruvbox dark: 2
git clone --depth 1 https://github.com/dexpota/kitty-themes.git ~/.config/kitty/kitty-themes
cd ~/.config/kitty
ln -s ./kitty-themes/themes/gruvbox_dark.conf ~/.config/kitty/theme.conf
- Now, quit Kitty with CMD-q and reopen to see all of the changes in place.
Neovim
- Run the following:
brew install neovim 3
sh -c 'curl -fLo "${XDGDATAHOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 4
mkdir ~/.config/nvim
cp <pathtokitty-neovim-tmux-ultimate-setup_folder>/init.vim ~/.config/nvim/init.vim 5
brew tap homebrew/cask-fonts && brew install --cask font-fira-code-nerd-font
brew install fzf 6
set rtp+=/usr/local/opt/fzf
brew install ripgrep 7
- Run
nvim(you don't call neovim, you have to call nvim instead), type:PlugInstall, and then click Enter. If there are any errors, there should be instructions that pop up to help you resolve them.
- Exit out of Neovim by executing
:quntil you are back in the terminal and then runnvimagain to see the customizations.
tmux
- Run the following: 8
brew install tmux
echo 'export PATH="/usr/local/opt/ncurses/bin:PATH"' >> ~/.zshrc
cp <pathtokitty-neovim-tmux-ultimate-setup_folder>/.tmux.conf ~/.tmux.conf
tmux
nvim
- In Neovim, execute
:Tmuxlineand then:TmuxlineSnapshot ~/tmuxline. 9 - Exit out of Neovim with
:q - Replace the commented-out line of your ~/.tmux.conf file with
# Toggle mouse on
bind-key M \
set-option -g mouse on \;\
display-message 'Mouse: ON'
Toggle mouse off
bind-key m \
set-option -g mouse off \;\
display-message 'Mouse: OFF'
- Save and then run
tmux source-file ~/.tmux.conf. - Kill your tmux session by hitting (CTRL-a)-x-y.
- Now, run
tmuxagain and your setup should be complete.
BONUS: Spotify in Neovim!
https://github.com/srishanbhattarai/neovim-spotify ;)
References
1 https://sw.kovidgoyal.net/kitty/binary.html#customizing-the-installation2 https://github.com/dexpota/kitty-themes/tree/master/themes
3 https://github.com/neovim/neovim/wiki/Installing-Neovim
4 https://github.com/junegunn/vim-plug
5 https://www.nerdfonts.com/font-downloads
6 https://github.com/junegunn/fzf
7 https://github.com/BurntSushi/ripgrep
8 https://medium.com/@jeongwhanchoi/install-tmux-on-osx-and-basics-commands-for-beginners-be22520fd95e
9 https://github.com/edkolev/tmuxline.vim#usage
Special Thanks!
Thank you to Agnes Jang for teaching me about how to set all of this up, informing me about the various possible customizations, and walking me through the depths of mastering Vim.