[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A feature to go to last edit locations

From: Konstantin Kharlamov
Subject: Re: A feature to go to last edit locations
Date: Tue, 14 Feb 2023 02:14:31 +0300
User-agent: Evolution 3.46.3

On Mon, 2023-02-13 at 14:49 -0500, Michael Welsh Duggan wrote:
> Daniel Martín <mardani29@yahoo.es> writes:
> > Some IDEs and text editors provide a feature to go to the position of
> > the last edit location across all buffers.  For example, in Eclipse or
> > IntelliJ IDEA, this feature is under Navigate, Last Edit Location.  In
> > Vim, this feature is called a "change list jump" [1], but it seems to
> > work in a per-buffer basis.
> > 
> > The closest thing in Emacs is pop-global-mark, but it's not quite the
> > same feature. The global mark ring requires that the user sets the mark
> > in advance, and most editing commands do not set the mark.  Information
> > about last edit locations is already kept in buffer-undo-list, but this
> > list is per-buffer and does not contain timestamps, so generating a
> > "global" list for all buffers out of this data structure does not seem
> > very possible or efficient at the moment; it may need a new data
> > structure, perhaps at the C level.
> I often want to jump to the last change I made in a buffer, but I've
> never wanted this across buffers.  The method I use for this, burned
> into my fingertips, is "C-_ C-SPC C-_", which is undo, set mark, undo.
> The set-mark causes the second undo to redo and could be replaced by a
> cursor movement instead, if one didn't want to mess up the mark
> location.
> So, although, once again, this doesn't work across buffers, using the
> undo list might be helpful for coding such a feature.

For buffer-local case I know at least one implementation that I use daily: in
Evil mode the `g;` combination. There may be others probably.

Global case though isn't covered AFAIK.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]