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

hippie-expand from GNU Emacs

Expand Messages
  • balaclavabob2
    Hello, Is there any macro in microemacs which mimics the GNU Emacs hippie-expand? hippie-expand is like an autocomplete while typing within a buffer. For
    Message 1 of 4 , Oct 3, 2003
    • 0 Attachment
      Hello,

      Is there any macro in microemacs which mimics the GNU Emacs hippie-expand?

      hippie-expand is like an autocomplete while typing within a buffer.

      For example:

      int blah1, blah2, blah3;

      Now if I typed 'b' and then activated 'hippie-expand' I would get
      'blah1' then if I pressed it again I would get 'blah2' instead.

      This is SO useful when using long variable names and if it is not
      included it shouldn't be to hard to make a macro for it?

      I don't have the time or the patience to make/test a macro todo this.

      Bob
    • Jon Green
      ... Hi Bob, I m not familier with hippie-expand. At the moment there is an auto look-back expansion which kind of does what you are looking for. Assuming that
      Message 2 of 4 , Oct 3, 2003
      • 0 Attachment
        balaclavabob2 wrote:
        > Hello,
        >
        > Is there any macro in microemacs which mimics the GNU Emacs hippie-expand?
        >
        > hippie-expand is like an autocomplete while typing within a buffer.
        >
        > For example:
        >
        > int blah1, blah2, blah3;
        >
        > Now if I typed 'b' and then activated 'hippie-expand' I would get
        > 'blah1' then if I pressed it again I would get 'blah2' instead.
        >
        > This is SO useful when using long variable names and if it is not
        > included it shouldn't be to hard to make a macro for it?
        >
        > I don't have the time or the patience to make/test a macro todo this.
        >
        > Bob
        >

        Hi Bob,

        I'm not familier with hippie-expand. At the moment there
        is an auto look-back expansion which kind of does
        what you are looking for.

        Assuming that you are running the latest release 12/02
        then:

        M-x user-setup
        Goto "General"
        And on the "Abbrev Expansion" then enable
        "Lookbk" (I usually enable "Dic't" as well).
        Then "Save" and "Current"

        <esc><esc> bound to "expand-abbrev-handle" (if you want
        to re-bind) will then look back, match and then expand
        whatever it finds that matches the starting string at
        the cursor.

        i.e.

        elephant
        giraffe
        kangaroo

        ele<esc><esc> -> elephant

        May be with a little tweeking to the macros then we could
        give you the previous occurence etc. as per hippe, but it
        is not doing this at the moment.

        Other useful thing may be...

        There is also the "occur" macro (right mouse option
        may also be bound to S-F7). This opens another
        window and finds occurences which can be quite useful
        in moving around the file or simply copying out of
        the window.

        See how you go with these, if you've some more
        suggestions of what we could do then get back to us.

        Regards
        Jon.
      • Phillips, Steven
        It looks like Emacs s hippie-expand is very similar to ME s expand-abbrev-handle in that it tries different methods to get an expansion. The behaviour
        Message 3 of 4 , Oct 6, 2003
        • 0 Attachment
          It looks like Emacs's hippie-expand is very similar to ME's expand-abbrev-handle in that it tries different methods to get an expansion. The behaviour described below is the 'try-expand-dabbrev' part of it which is similar to ME's expand-look-back command. The ability to search back further if executed again is a useful extension which I'll try to implement, not sure when though,

          Steve

          -----Original Message-----
          From: Jon Green [mailto:jon@...]
          Sent: 03 October 2003 22:57
          To: jasspa@yahoogroups.com
          Subject: Re: [jasspa] hippie-expand from GNU Emacs


          balaclavabob2 wrote:
          > Hello,
          >
          > Is there any macro in microemacs which mimics the GNU Emacs hippie-expand?
          >
          > hippie-expand is like an autocomplete while typing within a buffer.
          >
          > For example:
          >
          > int blah1, blah2, blah3;
          >
          > Now if I typed 'b' and then activated 'hippie-expand' I would get
          > 'blah1' then if I pressed it again I would get 'blah2' instead.
          >
          > This is SO useful when using long variable names and if it is not
          > included it shouldn't be to hard to make a macro for it?
          >
          > I don't have the time or the patience to make/test a macro todo this.
          >
          > Bob
          >

          Hi Bob,

          I'm not familier with hippie-expand. At the moment there
          is an auto look-back expansion which kind of does
          what you are looking for.

          Assuming that you are running the latest release 12/02
          then:

          M-x user-setup
          Goto "General"
          And on the "Abbrev Expansion" then enable
          "Lookbk" (I usually enable "Dic't" as well).
          Then "Save" and "Current"

          <esc><esc> bound to "expand-abbrev-handle" (if you want
          to re-bind) will then look back, match and then expand
          whatever it finds that matches the starting string at
          the cursor.

          i.e.

          elephant
          giraffe
          kangaroo

          ele<esc><esc> -> elephant

          May be with a little tweeking to the macros then we could
          give you the previous occurence etc. as per hippe, but it
          is not doing this at the moment.

          Other useful thing may be...

          There is also the "occur" macro (right mouse option
          may also be bound to S-F7). This opens another
          window and finds occurences which can be quite useful
          in moving around the file or simply copying out of
          the window.

          See how you go with these, if you've some more
          suggestions of what we could do then get back to us.

          Regards
          Jon.



          __________________________________________________________________________

          This is an unmoderated list. JASSPA is not responsible for the content of
          any material posted to this list.

          To unsubscribe, send a mail message to

          mailto:jasspa-unsubscribe@yahoogroups.com

          or visit http://groups.yahoo.com/group/jasspa and
          modify your account settings manually.




          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        • Phillips, Steven
          Bob, Attached is an improved version of the abbreviation handler which has hippie-expand style behaviour (calling expand-abbrev-handle (esc esc) multiple
          Message 4 of 4 , Oct 27, 2003
          • 0 Attachment
            Bob,

            Attached is an improved version of the abbreviation handler which has 'hippie-expand' style behaviour (calling expand-abbrev-handle (esc esc) multiple times will make it look back further).

            This version of abbrev.emf works well on my latest version of ME and I believe it will work on all recent releases but I would still back-up your version of this file in case it does not work.

            Let me know if this fits the bill,

            Steve

            -----Original Message-----
            From: balaclavabob2 [mailto:balaclavabob2@...]
            Sent: 03 October 2003 21:48
            To: jasspa@yahoogroups.com
            Subject: [jasspa] hippie-expand from GNU Emacs


            Hello,

            Is there any macro in microemacs which mimics the GNU Emacs hippie-expand?

            hippie-expand is like an autocomplete while typing within a buffer.

            For example:

            int blah1, blah2, blah3;

            Now if I typed 'b' and then activated 'hippie-expand' I would get
            'blah1' then if I pressed it again I would get 'blah2' instead.

            This is SO useful when using long variable names and if it is not
            included it shouldn't be to hard to make a macro for it?

            I don't have the time or the patience to make/test a macro todo this.

            Bob



            __________________________________________________________________________

            This is an unmoderated list. JASSPA is not responsible for the content of
            any material posted to this list.

            To unsubscribe, send a mail message to

            mailto:jasspa-unsubscribe@yahoogroups.com

            or visit http://groups.yahoo.com/group/jasspa and
            modify your account settings manually.




            Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          Your message has been successfully submitted and would be delivered to recipients shortly.