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

TextExpander

Expand Messages
  • Joseph Retzer
    Hi All,   I was wondering if anyone knew of a way to use the package TextExpander (from www.smileonmymac.com/TextExpander) in MacVim?   The package simply
    Message 1 of 9 , Jul 7, 2008
    View Source
    • 0 Attachment

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---

      Hi All,
        I was wondering if anyone knew of a way to use the package "TextExpander" (from www.smileonmymac.com/TextExpander) in MacVim?

        The package simply allows for "snippets" of text or graphics to be inserted in multiple applications on the Mac.

        I downloaded the demo and it did not work in MacVim but did in textedit (and I have no intention of switching to anything from MacVim :-)

      Many thanks,
      Joe Retzer
    • David Morel
      ... a more sophisticated version is snippetsEmu: http://www.vim.org/scripts/script.php?script_id=1318 David
      Message 2 of 9 , Jul 7, 2008
      View Source
      • 0 Attachment
        Le 8 juil. 08 à 01:18, Joseph Retzer a écrit :

        > Hi All,
        > I was wondering if anyone knew of a way to use the package
        > "TextExpander" (from www.smileonmymac.com/TextExpander) in MacVim?
        >
        > The package simply allows for "snippets" of text or graphics to be
        > inserted in multiple applications on the Mac.
        >
        > I downloaded the demo and it did not work in MacVim but did in
        > textedit (and I have no intention of switching to anything from
        > MacVim :-)
        >
        > Many thanks,
        > Joe Retzer
        >

        there is something similar in MacVim:

        :help iab

        a more sophisticated version is snippetsEmu:

        http://www.vim.org/scripts/script.php?script_id=1318

        David


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_multibyte" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • David Morel
        ... Duh! ... David --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_multibyte maillist. For more information,
        Message 3 of 9 , Jul 7, 2008
        View Source
        • 0 Attachment
          Le 8 juil. 08 à 07:22, David Morel a écrit :

          >
          >
          > Le 8 juil. 08 à 01:18, Joseph Retzer a écrit :
          >
          >> Hi All,
          >> I was wondering if anyone knew of a way to use the package
          >> "TextExpander" (from www.smileonmymac.com/TextExpander) in MacVim?
          >>
          >> The package simply allows for "snippets" of text or graphics to be
          >> inserted in multiple applications on the Mac.
          >>
          >> I downloaded the demo and it did not work in MacVim but did in
          >> textedit (and I have no intention of switching to anything from
          >> MacVim :-)
          >>
          >> Many thanks,
          >> Joe Retzer
          >>
          >
          > there is something similar in MacVim:
          >
          > :help iab

          Duh!

          :help :iabbrev will work better, or even :h abbreviations

          David
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_multibyte" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Nico Weber
          Hi, ... it looks like MacVim does not implement some stuff TextExpander expects to be there. There was a similar problem a while back (
          Message 4 of 9 , Jul 8, 2008
          View Source
          • 0 Attachment
            Hi,

            > 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.

            I'll get in touch with the TextPander guys and will try to fix this.

            Nico

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_multibyte" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Nico Weber
            Hi, ... MacVim _does_ work with TextExpander. It just does not work right after entering insert mode. Why? TextExpander starts a small background process
            Message 5 of 9 , Jul 8, 2008
            View Source
            • 0 Attachment
              Hi,

              >> 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
              SysPrefs->TextExpander->Preferences.

              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.

              HTH,
              Nico
              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_multibyte" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • björn
              ... That patch was never merged because it is incomplete. I need to figure out a reliable way to replace the current selection with a given string (or just
              Message 6 of 9 , Jul 8, 2008
              View Source
              • 0 Attachment
                2008/7/8 Nico Weber <nicolasweber@...>:
                >
                >> 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.

                That patch was never merged because it is incomplete. I need to
                figure out a reliable way to replace the current selection with a
                given string (or just insert the string if there is no selection).
                The problem is that it needs to work in all modes and the above patch
                only works in Visual mode (it doesn't even do the right thing in
                Select mode). If somebody could help me with this I could finish the
                patch and merge it.

                Thanks,
                Björn

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_multibyte" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Joseph Retzer
                Hi All,   First, thanks very much Nico for looking into this and providing valuable information. I too wrote the support folks for TextExpander and got this
                Message 7 of 9 , Jul 11, 2008
                View Source
                • 0 Attachment

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_multibyte" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---

                  Hi All,
                    First, thanks very much Nico for looking into this and providing valuable information. I too wrote the support folks for TextExpander and got this reply:

                  "Hi Joe,

                  Thanks for the feedback. I don't think we'll pursue a MacVIM-specific modification to TextExpander. However, we are considering no longer requiring space, tab, or return (whitespace) to precede abbreviations. If we make that change, things will work well with MacVIM.

                  Thanks for using TextExpander from SmileOnMyMac!

                  Regards,

                  Greg
                  TextExpander Support
                  textexpander@...


                  I'm hoping they implement this change soon. If I hear back that they have, I'll notify the list.

                  Thanks,
                  Joe


                  --- On Tue, 7/8/08, Nico Weber <nicolasweber@...> wrote:
                  From: Nico Weber <nicolasweber@...>
                  Subject: Re: TextExpander
                  To: vim_multibyte@...
                  Cc: textexpander@...
                  Date: Tuesday, July 8, 2008, 12:08 PM

                  Hi,

                  >> 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
                  SysPrefs->TextExpander->Preferences.

                  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.

                  HTH,
                  Nico
                • sedmonds
                  Hi, Have you found a solution for using VIm with Textexpander. I discovered that by first inserted successive blank lines(more than 8) that textexpander rules
                  Message 8 of 9 , Oct 16, 2010
                  View Source
                  • 0 Attachment
                    Hi,

                    Have you found a solution for using VIm with Textexpander.

                    I discovered that by first inserted successive blank lines(more than 8) that
                    textexpander rules work just fine.

                    I am running 10.6.4 and the latest version TE.

                    Let me know if this works for you.
                    --
                    View this message in context: http://vim.1045645.n5.nabble.com/TextExpander-tp1223299p3215956.html
                    Sent from the Vim - Multibyte mailing list archive at Nabble.com.

                    --
                    You received this message from the "vim_multibyte" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                  • Donald Ephraim Curtis
                    There is now an option in TextExpander that says Always use clipboard to insert snippet and this seems to work in MacVim for me. There is a problem with the
                    Message 9 of 9 , Dec 27, 2010
                    View Source
                    • 0 Attachment
                      There is now an option in TextExpander that says "Always use clipboard to insert snippet" and this seems to work in MacVim for me.

                      There is a problem with the main MacVim window that they disabled inserting to a range for some reason.  I think they need to fix it but for now this works.

                      --
                      You received this message from the "vim_multibyte" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                    Your message has been successfully submitted and would be delivered to recipients shortly.