Can anyone tell me how to change the Python colors in Vim. I've seen the following syntax but I'm not sure how to make it permanent.
:hi pythonComment ctermfg=2 gui=italic guifg=#408010
After typing the command, press “Tab”. This will open a list of all the available color schemes. If you keep pressing “Tab”, Vim will cycle through all of them.
The command to enable syntax highlighting in vim is :syntax on , if you want it to be active everytime you launch vim, just add a line containing syntax on in your . vimrc file. maybe your vim doesn't have filetype detection enabled, try adding filetype on to your .
The ctermfg=white is used to set the foreground color to white in a terminal text editor. Finally, the ctermbg=black is used to set the background color to black in a terminal text editor.
Some color schemes are already installed on your system. You can find those color schemes in the /usr/share/vim/vim*/colors directory as . vim extension.
You can just put it in your .vimrc
file. (Without the leading :
, as favoretti mentioned.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With