Loading ...
Sorry, an error occurred while loading the content.
 

Re: syntax on problem

Expand Messages
  • Tony Berkopes
    Charles, Well, I m not sure what happened, but my syntax highlighting is working!? I checked on the scripts MacVim loaded and didn t see anything strange. I
    Message 1 of 3 , Jul 12, 2011
      Charles,

      Well, I'm not sure what happened, but my syntax highlighting is
      working!? I checked on the 'scripts' MacVim loaded and didn't see
      anything strange. I moved 'syntax on" to a place farther in the file.
      Before, I had syntax highlighting when I loaded .vimrc and 'most'
      other *.vim files. But occasionally, the syntax was not recognized for
      a color scheme file and a .sh file. I had to type 'syntax on' @ vims
      CL. Lately I haven't had any problems...???

      Thanks for the reply. I will keep this email incase it happens again.
      I have abare bones .vimrc tucked away just in case.

      TonyB

      On Jul 12, 2011, at 10:39 AM, Charles Campbell wrote:

      retiredff wrote:
      > When I open MOST .vim files, the code has syntax highlighting. But on
      > occasion, if I open a .sh file or at times my vim color file, I must
      > goto
      > the cmdline and type 'syntax on'. Why is MacVim doing this? I have
      > syntax on
      > in my .vimrc. I tried different locations in the file, including
      > gvimrc. The
      > problem persists...
      >
      > I did a search and moved my 'syntax on' statement... no help.
      >
      I don't think there's enough information here to address your
      problem. I myself don't have a mac, so unless its a common problem
      (in which case I'd expect a lot of mac users would be bringing this
      up), its probably not mac related.

      So, here's a vim-ish way to check this out:

      Make a two line simple.vimrc:

      set nocp
      syn on

      Try vim --noplugin -u simple.vimrc somefile.sh

      Do you get syntax highlighting?

      If highlighting is now working, then try the above without the "--
      noplugin". If you're still getting syntax highlighting, then start
      looking for pertinent differences between your .vimrc and simple.vimrc .
      Note that the above is for vim, not gvim; if you're using gvim, also
      include "-U NONE" .

      Regards,
      Chip Campbell

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.