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

Re: how to

Expand Messages
  • Yakov Lerner
    ... This is true, but OTOH, one can include
    Message 1 of 5 , Jul 4, 2006
    • 0 Attachment
      On 7/4/06, Peter Hodge <toomuchphp-vim@...> wrote:
      > Hi Vincent,
      >
      > An abbreviation cannot begin with a non-keyword character and end in more than
      > one keyword character, thus <method is illegal, as is !method or %method, etc.

      This is true, but OTOH, one can include '<' character into 'isk' option
      which then makes ':iabbrev <xyz...' legal.

      For example, vimhelp buffers has isk defines such that
      it includes < character. This explains why ':iabbrev <method ...'
      worked for me; I tried it in the vimhelp buffer windows.

      > Maybe try ':iabbrev <method> ...' instead.

      Do you mean ':imap' here ? Indeed, :imap is worthwile
      substitute for :iabbr when :iabbr can't be used.

      Yakov
    • Vincent Wang
      First, thanks for your guys. I didn t think I whould receive response so quick. As Yakov suggested, before I execute the abbreviation, I add
      Message 2 of 5 , Jul 4, 2006
      • 0 Attachment
        First, thanks for your guys. I didn't think I whould receive response so
        quick.
        As Yakov suggested, before I execute the abbreviation, I add '<' to
        'iskeyword' option:
        :setlocal iskeyword+=<
        Then the command to define the abbreviation works:
        :iabbr <buffer> <method> <method name=""> </method>

        BTW, I met this problem when I setup snippetEmu.vim plugin, hope it will
        be helpful for you,too.

        Thanks again.

        BR
        Vincent

        Yakov Lerner wrote:

        > On 7/4/06, Peter Hodge <toomuchphp-vim@...> wrote:
        >
        >> Hi Vincent,
        >>
        >> An abbreviation cannot begin with a non-keyword character and end in
        >> more than
        >> one keyword character, thus <method is illegal, as is !method or
        >> %method, etc.
        >
        >
        > This is true, but OTOH, one can include '<' character into 'isk' option
        > which then makes ':iabbrev <xyz...' legal.
        >
        > For example, vimhelp buffers has isk defines such that
        > it includes < character. This explains why ':iabbrev <method ...'
        > worked for me; I tried it in the vimhelp buffer windows.
        >
        >> Maybe try ':iabbrev <method> ...' instead.
        >
        >
        > Do you mean ':imap' here ? Indeed, :imap is worthwile
        > substitute for :iabbr when :iabbr can't be used.
        >
        > Yakov
        >


        --
        "The tool that save the most labor in a programming project is probably a text-editing system" -- <<The Mythical Man-Month>>

        Try to make life easier ...
      Your message has been successfully submitted and would be delivered to recipients shortly.