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

Vim chokes on mail.vim ftplugin function

Expand Messages
  • Jorge Luis Gonzalez
    I m using Vim 7.3 from ports on FreeBSD. When mutt loads the editor it throws the following error: Error detected while processing
    Message 1 of 3 , Mar 9, 2013
    • 0 Attachment
      I'm using Vim 7.3 from ports on FreeBSD. When mutt loads the editor it
      throws the following error:

      Error detected while processing
      /usr/local/share/vim/vim73/ftplugin/mail.vim:
      line 54:
      :%s/^>[[:space:]%|#>]\+$//e
      :%s/^>[[:space:]%|#>]\+$//e

      Here's the function from the stock mail.vim ftplugin:

      function! Mail_Del_Empty_Quoted()
      exe "normal :%s/^>[[:space:]\%\|\#>]\\+$//e\<CR>"
      endfunction

      call Mail_Del_Empty_Quoted()

      Thanks,

      Jorge Luis

      --
      Jorge Luis González <list+vim@...>
      http://www.jorge.cc/ * ftp://ftp.jorge.cc/{pub,incoming}
      IRC: #vim jl-satyr * XMPP: jl-satyr@...
      GPG KEY -> 0x4AD9C195 * ICBM: 42.592627, -72.588859

      This email optimized for teletypes.

      --
      --
      You received this message from the "vim_use" 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 because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Marcin Szamotulski
      Hi, I don t see such a function in /usr/share/vim/vim73/ftplugin/mail.vim (on Linux) I got it using: globpath(&rtp, ftplugin/mail.vim ). My version of this
      Message 2 of 3 , Mar 9, 2013
      • 0 Attachment
        Hi,

        I don't see such a function in
        /usr/share/vim/vim73/ftplugin/mail.vim (on Linux)

        I got it using: globpath(&rtp, 'ftplugin/mail.vim'). My version of this
        file is from: 2012 Nov 20.

        The exe command works here just fine. Maybe your vim is not compiled
        with some features ...

        Marcin



        On 05:06 Sat 09 Mar , Jorge Luis Gonzalez wrote:
        > I'm using Vim 7.3 from ports on FreeBSD. When mutt loads the editor it
        > throws the following error:
        >
        > Error detected while processing
        > /usr/local/share/vim/vim73/ftplugin/mail.vim:
        > line 54:
        > :%s/^>[[:space:]%|#>]\+$//e
        > :%s/^>[[:space:]%|#>]\+$//e
        >
        > Here's the function from the stock mail.vim ftplugin:
        >
        > function! Mail_Del_Empty_Quoted()
        > exe "normal :%s/^>[[:space:]\%\|\#>]\\+$//e\<CR>"
        > endfunction
        >
        > call Mail_Del_Empty_Quoted()
        >
        > Thanks,
        >
        > Jorge Luis
        >
        > --
        > Jorge Luis González <list+vim@...>
        > http://www.jorge.cc/ * ftp://ftp.jorge.cc/{pub,incoming}
        > IRC: #vim jl-satyr * XMPP: jl-satyr@...
        > GPG KEY -> 0x4AD9C195 * ICBM: 42.592627, -72.588859
        >
        > This email optimized for teletypes.
        >
        > --
        > --
        > You received this message from the "vim_use" 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 because you are subscribed to the Google Groups "vim_use" group.
        > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        > For more options, visit https://groups.google.com/groups/opt_out.
        >

        --
        --
        You received this message from the "vim_use" 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 because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Christian Brabandt
        Hi Jorge! ... That looks strange. First, there really is no need for an exe call here, second, when using exe ... backslashes within quoted strings need to
        Message 3 of 3 , Mar 9, 2013
        • 0 Attachment
          Hi Jorge!

          On Sa, 09 Mär 2013, Jorge Luis Gonzalez wrote:

          > I'm using Vim 7.3 from ports on FreeBSD. When mutt loads the editor it
          > throws the following error:
          >
          > Error detected while processing
          > /usr/local/share/vim/vim73/ftplugin/mail.vim:
          > line 54:
          > :%s/^>[[:space:]%|#>]\+$//e
          > :%s/^>[[:space:]%|#>]\+$//e
          >
          > Here's the function from the stock mail.vim ftplugin:
          >
          > function! Mail_Del_Empty_Quoted()
          > exe "normal :%s/^>[[:space:]\%\|\#>]\\+$//e\<CR>"
          > endfunction

          That looks strange. First, there really is no need for an exe call here,
          second, when using exe "..." backslashes within quoted strings need to
          be escaped. Third, the normal is superflous and fourth, the \<CR>
          shouldn't really be there.

          >
          > call Mail_Del_Empty_Quoted()

          This is not in the official distributed runtime scripts that come
          bundled with vim. Get in contact with the maintainer of that file. It
          should be mentioned at the first couple of lines of
          /usr/local/share/vim/vim73/ftplugin/mail.vim

          And possibly also file a bug report at FreeBSD.

          regards,
          Christian
          --
          Wie man sein Kind nicht nennen sollte:
          Angela Ufen

          --
          --
          You received this message from the "vim_use" 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 because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.