Is it possible to setup a specific colorscheme for a specific filetype in a vimrc file?
PlainBoringWhite for .txt
SomethingDarkBackdround for .c or .rb
|
Is it possible to setup a specific colorscheme for a specific filetype in a vimrc file? PlainBoringWhite for .txt SomethingDarkBackdround for .c or .rb | |||
|
feedback
|
This question came from our site for professional programmers interested in conceptual questions about software development.
|
While you could use an aucommand to set a specific colorscheme for a specific filetype or filename pattern, it is more common to use a syntax file to define highlight groups for elements and then use your global colorscheme to handle coloring of those groups. | |||
|
feedback
|
|
As @Rein mentioned, you can use autocommand to achieve what you want. Add something like this to your .vimrc file:
| |||
|
feedback
|