Vim colours in Mac OS X disappeared

  • Thread starter Thread starter cepheid
  • Start date Start date
  • Tags Tags
    Mac Os
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
Messages
5,197
Reaction score
38
When I open a C source file in vim in Mac OS X, syntax is no longer colour-coded. I think that this happened after I tinkered around with ~/.bash_profile. I did the latter because I was trying to get ls to use colours, and I found an article online that told me what lines to add to .bash_profile to get ls colours. But even after commenting out my additions to .bash_profile, the problem remains.

I'm not even sure where vim is installed. I think that I did not have it until I installed the Xcode developer tools (but I could be wrong). Does anyone know how I can restore the default colouring?
 
Last edited by a moderator:
Physics news on Phys.org
Nevermind.

I turn on colours by adding the line "syntax on" to my /usr/share/vim/vimrc file.

It could be that I never had colours in vim on my mac and I was just confused (because I used vim on one of the linux boxes in my lab over ssh -- from my mac).