highlighting for your file type.
You could try using a similar file type by manually setting it as
mentioned above. If that isn't good enough, you can write your own
syntax file, see |mysyntaxfile|.
Or the colors could be wrong:
- The colored text is very hard to read.
Vim guesses the background color that you are using. If it is black
(or another dark color) it will use light colors for text. If it is
white (or another light color) it will use dark colors for text. If
Vim guessed wrong the text will be hard to read. To solve this, set
the 'background' option. For a dark background: >
:set background=dark
< And for a light background: >
:set background=light
< Make sure you put this _before_ the ":syntax enable" command,
otherwise the colors will already have been set. You could do
":syntax reset" after setting 'background' to make Vim set the default
colors again.
- The colors are wrong when scrolling bottom to top.
Vim doesn't read the whole file to parse the text. It starts parsing
wherever you are viewing the file. That saves a lot of time, but
sometimes the colors are wrong. A simple fix is hitting CTRL-L. Or
scroll back a bit and then forward again.
For a real fix, see |:syn-sync|. Some syntax files have a way to make
it look further back, see the help for the specific syntax file. For
example, |tex.vim| for the TeX syntax.
==============================================================================
*06.3* Different colors *:syn-default-override*
If you don't like the default colors, you can select another color scheme. In
the GUI use the Edit/Color Scheme menu. You can also type the command: >
:colorscheme evening
"evening" is the name of the color scheme. There are several others you might
want to try out. Look in the directory $VIMRUNTIME/colors.
When you found the color scheme that you like, add the ":colorscheme" command
to your |init.vim| file.
You could also write your own color scheme. This is how you do it:
1. Select a color scheme that comes close. Copy this file to your own Vim
directory. For Unix, this should work: >
!mkdir -p ~/.config/nvim/colors
!cp $VIMRUNTIME/colors/morning.vim ~/.config/nvim/colors/mine.vim