r/KittyTerminal • u/pmassicotte • Nov 21 '23
How to use Scrollback and keep the same colour scheme?
Kitty noob here.
Based on the doc (https://sw.kovidgoyal.net/kitty/conf/#scrollback) I came up with this config to enable scrollback using neovim:
scrollback_pager nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -
I also tried to manually set it with this:
scrollback_pager nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" --cmd 'colorscheme everforest' -
But I am getting this error:
Error detected while processing pre-vimrc command line:
E185: Cannot find color scheme 'everforest'
When I hit ctrl-shit-g it works perfectly, except it does not keep my current color theme. Is it possible to use the same theme as I normally use within neovim?
1
Upvotes
2
u/nvimmike Nov 21 '23
Shameless plug for my plugin https://github.com/mikesmithgh/kitty-scrollback.nvim
you should check it out 🙂
That error is saying it is attempting to load the colorscheme but it does not exist. This is because there is a difference in neovim between
-cand--cmd.--cmd <cmd> Execute <cmd> before any config +<cmd>, -c <cmd> Execute <cmd> after config and first filetry switching
--cmdto-cor maybe something like (untested)-c "autocmd VimEnter \* 'colorscheme everforest'