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

2516Re: TextExpander

Expand Messages
  • Nico Weber
    Jul 8, 2008
    • 0 Attachment

      >> I was wondering if anyone knew of a way to use the package
      >> "TextExpander" (from www.smileonmymac.com/TextExpander) in MacVim?
      > it looks like MacVim does not implement some stuff TextExpander
      > expects to be there. There was a similar problem a while back ( http://groups.google.com/group/vim_mac/browse_thread/thread/f8b057ec6afe12e7/5516236a1466978b?lnk=gst&q=applescript#5516236a1466978b
      > . By the way, why has this patch not been merged?), but the fix
      > proposed in that thread does not help here.

      MacVim _does_ work with TextExpander. It just does not work right
      after entering insert mode. Why?

      TextExpander starts a small background process ('textexpanderd', you
      can find it in Activity Monitor). This process logs all of your
      keypresses. When it sees one of the macros (for example the default
      macro "ttime"), it replaces that macro with its replacement: It
      somehow deletes the macro text, stores the current pasteboard content,
      then puts the replacement text in the pasteboard, activates ⌘V in the
      current application, and restores the old pasteboard content. Nearly
      all of this does work with MacVim.

      However, MacVim uses modes, and you need to press 'i' to enter insert
      mode. So when you enter insert mode and the type 'ttime', TextExpander
      sees 'ittime' (it doesn't know about modes) and thus, the keyword is
      not triggered. It seems it does not work to add 'i' as a delimiter in

      What you can do: Put `map <Space> i` in your _vimrc and use Space to
      enter insert mode. Then TextExpander sees a space before your macro,
      but the space is remapped to 'i' for vim. Cons: You have to use Space
      instead of 'i' to enter insert mode, and this doesn't work if you
      enter insert mode through other keys (e.g. 'o', 'O').

      I've cc'd the TextExpander guys, perhaps they have a better suggestion.

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