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

84561Re: not posible to change the colour-scheme in VIM for mac

Expand Messages
  • Tony Mechelynck
    Nov 1, 2007
      Tony Mechelynck wrote:
      > MacVlad wrote:
      >> I use also a scheme (vladdark.vim, see below:) I addapt from darkblue.
      >> This works very well ... but seems to work only on a PC :-(((
      >>
      >> If I try to use this color scheme on my mac (with :color vladdark) I
      >> get a lot of errors:
      >>
      >> ---
      >> Error detected while processing /Applications/vim70/Vim.app/Contents/
      >> Resources/vim/runtime/colors/vladdark.vim:
      >> line 20:
      >> E492: Not an editor command: ^M
      >> line 24:
      >> E492: Not an editor command: ^M
      >> line 25:
      >> E474: Invalid argument: bg=dark^M
      >> line 26:
      >> E411: highlight group not found: clear^M
      >> line 27:
      >> E15: Invalid expression: exists("syntax on")^M
      >> line 86:
      >> E171: Missing :endif
      >> ---
      >>
      >> Do you have any ideas?
      >> Thanks in advance!
      >>
      >>
      >> Regards,
      >> Vlad
      >
      > These errors mean that your script has dos-like ends-of-lines in some lines,
      > and that it's being run on a program version which doesn't recognise them.
      >
      > Try the following:
      >
      > 1. Move the script to $HOME/.vim/colors (creating that directory if it doesn't
      > exist), because in $VIMRUNTIME/colors it will be lost once you upgrate to Vim
      > 7.1 (which I recommend doing).
      >
      > 2. Open it for editing with
      >
      > :e ++ff=dos ~/.vim/colors/vladdark.vim
      >
      > There should be no ^M at the end of the lines.
      >
      > 3. Correct the error at line 27, which uses an invalid construct:
      >
      > :27s/exists("syntax on")/has("syntax")

      Oops, sorry, ignore this #3. The statement, with exists("syntax_on") and with
      an underscore between syntax and on, is correct as it stands. The problem is
      the Dos-like end-of-line, which #2 and #4 should cure.

      >
      > 4. Save it with
      >
      > :setlocal ff=unix
      > :wq
      >
      > From then on, this new version should work with any version of Vim. If it
      > still gives errors, they should be genuine: e.g. if the error at line 87 still
      > appears, check that your ifs and endifs are correctly balanced.
      >
      >
      > Best regards,
      > Tony.
      --
      A remarkable race are the Persians;
      They have such peculiar diversions.
      They make love the whole day
      In the usual way
      And save up the nights for perversions.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 14 messages in this topic