Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the Python colours in Vim?

Tags:

python

vim

vi

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
like image 226
felix001 Avatar asked Aug 08 '12 11:08

felix001


People also ask

How do I change colors in vim?

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.

How do I enable Python syntax highlighting in vim?

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 .

How do I change the background color in vim?

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.

Where are vim color schemes?

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.


1 Answers

You can just put it in your .vimrc file. (Without the leading :, as favoretti mentioned.)

like image 193
JAB Avatar answered Oct 14 '22 10:10

JAB