user3655264
user3655264

Reputation: 72

Vim Only Highlighting ~/.vimrc

I am a new vim user and trying to turn on syntax coloring for vim on Mac OS X. I followed http://vim.wikia.com/wiki/Turn_on_syntax_coloring_in_Mac_OS_X's instructions, and my ~/.vimrc file has the following content

set term=builtin_ansi
filetype plugin indent on
syntax on

And the text above in ~/.vimrc is highlighted perfectly fine. However, whenever I use vim to edit a current text file or create a new one, I only see black and white text, and manually calling :syntax on does nothing. Any help is apprecaited!

Upvotes: 0

Views: 241

Answers (2)

Ingo Karkat
Ingo Karkat

Reputation: 172748

You can use the :highlight command to list all defined groups (according to your colorscheme). A plain text file probably has no filetype and therefore no syntax assigned; you want to try this with any programming language (e.g. *.py or *.c) to see syntax highlighting in action.

Your ~/.vimrc looks fine. (Do you really need the :set term, though?!)

Upvotes: 1

romainl
romainl

Reputation: 196826

You should remove that useless line:

set term=builtin_ansi

Do you use the default Vim? What filetypes are you editing?

Upvotes: 1

Related Questions