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

81348Re: Abbreviations beginning with non-keyword character

Expand Messages
  • Tony Mechelynck
    Aug 1, 2007
    • 0 Attachment
      Kahn jonas wrote:
      >
      > Abbreviations may begin with a non-id character, but there are more
      > constraints: [...]
      >
      >
      > That I knew. I wondered if I could have something like \al as an
      > abbreviation
      >
      >
      >
      > What you can do is map the \ key to start a function which would get
      > keyboard
      > input, process it, and finally return a string to be inserted into
      > the buffer.
      > The partial sequence would probably not appear in the file window
      > though. It
      > might be possible (I'm not sure, I haven't pushed the idea to its
      > end) to have
      > it appear at the bottom, on the command/status line. I think Dr.Chip
      > is more
      > expert than I am about "crazy" mappings.
      >
      >
      >
      > Thank you. I'll try to write a function that does the work. Maybe with
      > python, I can even manage to see it on the screen. I'll let poeple know
      > if I can get a solution (probably an unreadable hack)...
      >
      > Jonas

      Don't forget the possibilities of ":imap <expr> {lhs} {rhs}" and ":imap {lhs}
      <C-R>={expression}".


      Best regards,
      Tony.
      --
      "The best thing for being sad," replied Merlin, beginning to puff and
      blow, "is to learn something. That's the only thing that never fails.
      You may grow old and trembling in your anatomies, you may lie awake at
      night listening to the disorder of your veins, you may miss your only
      love, you may see the world about you devastated by evil lunatics, or
      know your honour trampled in the sewers of baser minds. There is only
      one thing for it then -- to learn. Learn why the world wags and what
      wags it. That is the only thing which the mind can never exhaust,
      never alienate, never be tortured by, never fear or distrust, and never
      dream of regretting. Learning is the only thing for you. Look what a
      lot of things there are to learn."
      -- T.H. White, "The Once and Future King"

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