Mastodon hachyterm.io

kitty is the terminal emulator that I use in conjunction with fish.

Kitty is fast, customizable, and has font ligatures.
When I start a Vim session from the kitty terminal, Vim looks smooth (I use Victor Mono as my font).

If you want to switch kitty’s color scheme, you can use kitty @ set-colors --all <path-to-colors-file> to interactively switch colors in your session.

I wrote a fish function that uses kitty @ set-colors and sed to switch colors for both kitty and (Neo)Vim.

Example:

function nord
	kitty @ set-colors -a -c ~/.config/kitty/nord.conf
sed -e '1 c\colorscheme nord' -e '2 c\let g:lightline.colorscheme="nord"' -e '3d' ~/.config/nvim/colorscheme.vim > ~/.config/nvim/colorscheme.vim.tmp && mv ~/.config/nvim/colorscheme.vim.tmp ~/.config/nvim/colorscheme.vim
end

After running the function, the colorscheme.vim file looks like this:

colorscheme nord
let g:lightline.colorscheme="nord"

My NeoVim config (~/.config/nvim/init.vim) loads the file:

" CONFIG FILES
source ~/.config/nvim/general.vim
source ~/.config/nvim/plugin_installation.vim
source ~/.config/nvim/plugin_config.vim
source ~/.config/nvim/keys.vim
source ~/.config/nvim/colorscheme.vim

If you want to learn more about sed, you should check out the sed manual.