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

Help with ruby Vim Extensions on OS X Tiger

Expand Messages
  • Unnsse Khan
    Hello again :-) Ok, I am using VIM 7.0aa Alpha on Mac OS X Tiger 10.4... Here s my problem: When ever I launch the Terminal in OS X and type gvim, it actually
    Message 1 of 4 , Oct 1, 2005
    • 0 Attachment
      Hello again :-)

      Ok, I am using VIM 7.0aa Alpha on Mac OS X Tiger 10.4...

      Here's my problem:

      When ever I launch the Terminal in OS X and type gvim, it actually
      does launch gvim, and everything runs fine and dandy but in my shell,
      I get this runtime error:

      Error detected while processing /Applications/Vim.app/runtime/plugin/
      ruby.vim:
      line 1:
      E474: Invalid argument: foldmethod=syntax^M
      line 2:
      E669: Unprintable character in group name
      E409: Unknown group name: rubyTodo^M
      E475: Invalid argument: rubyComment "#.*" contains=rubyTodo^M
      line 3:
      E475: Invalid argument: rubyMarkedRegion start="#begin_region"
      end="#end_region" contains=rubyTodo fold ^M

      The web site I used to configure Ruby:

      http://www.rubygarden.org/ruby?VimExtensions

      This is what I did:

      I placed a file called rubymenu.vim in /Applications/Vim.app/runtime

      rubymenu.vim contained the following line of code:

      amenu &Ruby.&Run :!ruby %

      I also placed a file called ruby.vim in /Applications/Vim.app/runtime/
      plugin

      ruby.vim's contents are:

      set foldmethod=syntax
      syn match rubyComment "#.*" contains=rubyTodo
      syn region rubyMarkedRegion start="#begin_region" end="#end_region"
      contains=rubyTodo fold
      set foldtext=getline(v:foldstart)
      " you may try out this: set foldcolumn=3
      set fillchars=fold:\ " note the whitespace after
      " not neccessary but useful (so you can use the TAB key to fold/unfold):
      map <TAB> za

      This is what my .vimrc file contains:

      set nocompatible
      set ts=4
      source $VIMRUNTIME/rubymenu.vim
      set keymodel=startsel
      set nu
      set autoindent
      set ruler
      set backspace=indent,eol,start
      syntax on
      colorscheme torte
      set gfn=Anonymous:h12
      imap <D-Z> u
      imap <D-z> <C-O>u

      the $VIMRUNTIME is of course:

      /Applications/Vim.app/runtime

      Any suggestions?

      Many, many thanks!

      -Unnsse
    • Bram Moolenaar
      ... Your ruby.vim apparently is in dos fileformat. I should be unix. Edit the file and do :set ff=unix|w . -- A parent can be arrested if his child cannot
      Message 2 of 4 , Oct 1, 2005
      • 0 Attachment
        Unnsse Khan wrote:

        > Ok, I am using VIM 7.0aa Alpha on Mac OS X Tiger 10.4...
        >
        > Here's my problem:
        >
        > When ever I launch the Terminal in OS X and type gvim, it actually
        > does launch gvim, and everything runs fine and dandy but in my shell,
        > I get this runtime error:
        >
        > Error detected while processing /Applications/Vim.app/runtime/plugin/
        > ruby.vim:
        > line 1:
        > E474: Invalid argument: foldmethod=syntax^M
        > line 2:
        > E669: Unprintable character in group name
        > E409: Unknown group name: rubyTodo^M
        > E475: Invalid argument: rubyComment "#.*" contains=rubyTodo^M
        > line 3:
        > E475: Invalid argument: rubyMarkedRegion start="#begin_region"
        > end="#end_region" contains=rubyTodo fold ^M

        Your ruby.vim apparently is in dos fileformat. I should be unix.

        Edit the file and do ":set ff=unix|w".

        --
        A parent can be arrested if his child cannot hold back a burp during a church
        service.
        [real standing law in Nebraska, United States of America]

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
      • Unnsse Khan
        Bram, When I edited the file by typing: Raven:/Applications/Vim.app/runtime/plugin untz$ gvim ruby.vim gvim launched and displayed the contents of ruby.vim I
        Message 3 of 4 , Oct 1, 2005
        • 0 Attachment
          Bram,

          When I edited the file by typing:

          Raven:/Applications/Vim.app/runtime/plugin untz$ gvim ruby.vim

          gvim launched and displayed the contents of ruby.vim

          I then clicked on the ":" and typed this:

          set ff=unixlw

          I got this error message:

          E474 Invalid argument ff=unixlw

          Therefore, nothing is changed and this is still broken...

          Has anyone found a way to correctly install these Vim Extensions on
          OS X Tiger?

          Should I use the RubyGems package manager utility to install the
          necessary vim files?

          When I did a query using RubyGems I discovered a vim-ruby:

          Raven:~ untz$ gem query -rn vim-ruby

          *** REMOTE GEMS ***

          vim-ruby (2005.09.15, 2004.09.20)
          Ruby configuration files for Vim. Run 'vim-ruby-install.rb' to
          complete installation.

          Has anyone used installed this with the VIM 7.0aa ALPHA version on OS
          X? Should I install this version (meaning will it ruin the working
          copy of gvim/vim that I already have installed)?

          Any tips, suggestions, and help are greatly appreciated.....

          Many, many thanks!

          Unnsse

          On Oct 1, 2005, at 3:20 AM, Bram Moolenaar wrote:

          >
          > Unnsse Khan wrote:
          >
          >
          >> Ok, I am using VIM 7.0aa Alpha on Mac OS X Tiger 10.4...
          >>
          >> Here's my problem:
          >>
          >> When ever I launch the Terminal in OS X and type gvim, it actually
          >> does launch gvim, and everything runs fine and dandy but in my shell,
          >> I get this runtime error:
          >>
          >> Error detected while processing /Applications/Vim.app/runtime/plugin/
          >> ruby.vim:
          >> line 1:
          >> E474: Invalid argument: foldmethod=syntax^M
          >> line 2:
          >> E669: Unprintable character in group name
          >> E409: Unknown group name: rubyTodo^M
          >> E475: Invalid argument: rubyComment "#.*" contains=rubyTodo^M
          >> line 3:
          >> E475: Invalid argument: rubyMarkedRegion start="#begin_region"
          >> end="#end_region" contains=rubyTodo fold ^M
          >>
          >
          > Your ruby.vim apparently is in dos fileformat. I should be unix.
          >
          > Edit the file and do ":set ff=unix|w".
          >
          > --
          > A parent can be arrested if his child cannot hold back a burp
          > during a church
          > service.
          > [real standing law in Nebraska, United States of America]
          >
          > /// Bram Moolenaar -- Bram@... -- http://
          > www.Moolenaar.net \\\
          > /// Sponsor Vim, vote for features -- http://www.Vim.org/
          > sponsor/ \\\
          > \\\ Project leader for A-A-P -- http://www.A-A-
          > P.org ///
          > \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/
          > lotr.html ///
          >
        • A. J. Mechelynck
          ... [...] It s not unixlw (unix ell doubleu) it s unix|w (unix bar doubleu). Or you could also do ... No need to click with the mouse, you can hit the : key on
          Message 4 of 4 , Oct 1, 2005
          • 0 Attachment
            Unnsse Khan wrote:
            > Bram,
            >
            > When I edited the file by typing:
            >
            > Raven:/Applications/Vim.app/runtime/plugin untz$ gvim ruby.vim
            >
            > gvim launched and displayed the contents of ruby.vim
            >
            > I then clicked on the ":" and typed this:
            >
            > set ff=unixlw

            >
            > I got this error message:
            >
            > E474 Invalid argument ff=unixlw
            >
            > Therefore, nothing is changed and this is still broken...
            [...]


            It's not unixlw (unix ell doubleu) it's unix|w (unix bar doubleu). Or
            you could also do

            :set ff=unix
            :w

            No need to click with the mouse, you can hit the : key on the keyboard.


            Best regards,
            Tony.
          Your message has been successfully submitted and would be delivered to recipients shortly.