Search code examples
ruby-on-railsvimvim-syntax-highlighting

rails vim syntax highlighting


Please excuse my naivety, I come from a world of Textmate but have decided to give vim rails a shot.

I cannot get my syntax highlighting to work, I'm sure this is probably my setup but I am not vim savvy in knowing how to fix this.

Commands like :Rfind etc. are working.

Anyone care to give me some pointers?


Solution

  • Not sure if these commands are OS independent, but take a look at this and see if it helps:

    https://help.ubuntu.com/community/VimHowto#Enable%20Syntax%20Highlighting

    Specifically:

    If you want to just enable syntax highlighting for a session, you can simply issue a colon command

    :syn on
    

    Syntax highlighting can be turned off by issuing another 'colon' command

    :syn off
    

    To make this permanent everytime you open a file, just add the following line to your vimrc.

    syntax on