SourceForge has been redesigned. Learn more.

#60 tagstack

TK Soh

This is a patch to add vim-like tagstack capability to
NEdit. When you make a successful call to "Find
Definition", the current window position is pushed into
a LIFO stack before make jump, where you can later
return the position by popping the tagstack.


  • TK Soh

    TK Soh - 2002-07-30

    patch v1 for 5.3. original release

  • Nathan Gray

    Nathan Gray - 2002-07-31

    Logged In: YES

    I like the idea a lot -- in fact, I do this already with a set
    of macros and the mark functions. I'd like to see it
    built-in, though, since my way is pretty awkward to set
    up and has its shortcomings (only 10 locations and
    potential interation problems with other macros).

    I'd actually like to see it go further. I'd like the option of
    making more of the search operations push to the
    tagstack. I often need to search for a definition then
    return to my location, and I always forget to set a mark
    before I do the search.

    Really, I'd love to see a browser-like history, which
    wouldn't be so much more difficult than a stack, but first
    things first...

  • TK Soh

    TK Soh - 2002-07-31

    Logged In: YES

    I forgot to mention explicitly this tagstack is cross-window.

    bookmarks are currently local to windows, so it won't work
    most of the time, especially on serious projects using
    modular languages.

    on pushing the search operations, I guess might be better to
    maintain a separate stack, else it might make the tagstack a
    bit too crowded and probably confusing. hmm...

    I had done some experiment with the history list, but put it
    aside after awhile. maybe I should look at it again.

  • Arne F�rlie

    Arne F�rlie - 2002-08-04

    Logged In: YES

    I have actually implemented the same functionality, but I
    never got around to provide a proper patch. If your patch is
    included I'll be happy to scrap my work.

    I have a few nitpicks:
    - in menu.c you shouldn't provide the 'pop-tagstack' and
    'clear-tagstack' action routines. New action routines should
    use underscore, and existing action routines with dashes are
    only there for backward compatibility.

    - in tags.c you have defined a static function
    normalizePathname, but not provided a definition for it.

  • TK Soh

    TK Soh - 2002-08-05

    Logged In: YES

    AFAIK, YunLiang Yu also had done some work on it awhile
    back, but it was never 'officially' released. And I didn't
    want to wait.

    Please don't scrap your patch, submit it. I am sure there
    are things we can learn from each other. To me, it was never
    about competition.

    Now only I've come to understand why there are two flavors
    of action routine names. Thanks for the information.

    Patch v1.1 has the clean up.

  • TK Soh

    TK Soh - 2002-08-05

    tagstack patch v1.1 for 5.3. with housekeeping

  • TK Soh

    TK Soh - 2003-04-03

    v 1.2: updated to CVS -D 27-Mar-03

  • Scott Tringali

    Scott Tringali - 2004-07-01

    Logged In: YES

    I do like the idea, but it's hard for me to weigh an opinion here without adding the patch and trying it.

    Maybe if we could write up a UI spec, that describes all the new user-visible functionality (just a few paragraphs, really) for this. E.g., how do I "return to the position"? Is there a web-browser like "Back" button?

    Then we can discuss on the group what a good UI will be for this, before it hits CVS. Otherwise, the UI tends to churn a lot in code. The idea is to churn the UI with words first.

  • TK Soh

    TK Soh - 2004-07-02

    Logged In: YES

    There's no fancy window or any GUI appearances for now,
    just a plain Shift-Ctrl-D to do the opposite of Ctrl-D, so I
    don't have to run through the long window list to find my way
    back. Quite honestly, I couldn't have written those code as
    fast, if not because of the patch.

    It'd be nice if we could have a more complete design to
    handle tags manipulation. But in some way, it's fixing a bug.

  • TK Soh

    TK Soh - 2004-10-26

    updated for NEdit-5.5

  • TK Soh

    TK Soh - 2004-10-26

    Logged In: YES

    Uploaded patch for NEdit 5.5

  • TK Soh

    TK Soh - 2005-05-03

    Logged In: YES

    Uploaded - a macro implementation of the
    tagstack feature.

    Two macros are implemented: 'find tag' and 'pop tag', which
    are bound to Ctrl-] and Shift-Ctrl-] respectively.

    Use nedit's -import option to apply the macro, then save the
    default preferences to keep them:

    nedit -import

  • TK Soh

    TK Soh - 2005-05-03

    macro v1.0: a macro implementation of tagstack

  • Nobody/Anonymous

    this is great!
    is there a way to remap the keys from ctrl+], ctrl+shift+] to ctrl+d, ctrl+shift+d ??


  • Maxim Yanchenko

    Maxim Yanchenko - 2011-05-09

    v1_2 doesn't work with nedit 5.6 (i.e. the current CVS HEAD) - any chance to have an updated version?

    It should probably be changed to get the new ignoreModify flag into account?

  • Comment has been marked as spam. 

    You can see all pending comments posted by this user  here


    Anonymous - 2011-07-01

    the patch is so old that I am not even sure I can update it to HEAD. Beside I'd really recommend you try the macro version. And it's actually a much more portable solution than patching the core. The only issue that NEdit doesn't have good system to import/setup the macros & their menus easily. Have you tried it?


Log in to post a comment.