Friday, October 23, 2020

Hot to set Gruvbox to Vim with dark theme

 Setting up VIM with gruvbox dark theme
- install git on your terminal
- create a hidden VIM directory

mkdir ~/.vim

- clone the repo to the VIM folder

git clone https://github.com/morhetz/gruvbox.git ~/.vim

- test colorschme + spacebar + tab to check if gruvbox theme is available in VIM's colorscheme.
- to permanently set this colorscheme when you launch the application, enter the following

echo 'colorscheme gruvbox' >> ~/.vimrc

- to permanently set the dark background, enter the following

echo 'set bg=dark' >> ~/.vimrc

- to permanently set the number line, enter the following

        echo 'set number' >> ~/.vimrc

Additional note to add additional colorscheme to Vim.
First is to clone the source from github to local folder such as ~/.vim_newcolorscheme_folder
Copy over the .vim file from this folder to ~/.vim/colors to make it available.






Sources
:
How to change colors and themes in VIM
https://opensource.com/article/19/12/colors-themes-vim


How to enable dark mode in gruvbox
https://github.com/morhetz/gruvbox/issues/224

Git link for gruvbox
https://github.com/morhetz/gruvbox

No comments:

Post a Comment