nano-devel
[Top][All Lists]
Advanced

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

Re: Fwd: [PATCH 2/3] new feature: "knots" -- a kind of bookmarks, that c


From: Brand Huntsman
Subject: Re: Fwd: [PATCH 2/3] new feature: "knots" -- a kind of bookmarks, that can be cycled through
Date: Mon, 6 Apr 2020 05:59:55 -0600
User-agent: -

On 12:22 Mon  6-Apr-2020, Benno Schulenberg wrote:
> So, you have both visible bookmarks AND invisible return points?

Yes. The return points are mostly to undo a search, but also useful to
jump back and forth between the start point and the match, without any
explicit anchoring at either end.


> Jumping back to previous matches is done with M-Q, right?  And jumping back
> to the point where the search started with Sh-M-Q?  Or do you place a return
> point for every press of M-Q/M-W?

Alt-QW search backward and forward, alt-shift-QW jump to previous or
next bookmark, and alt-shift-BN jump to previous(Back) or Next return
points. Two return points are set every time the search advances forward
or backward. The direction doesn't matter, it just marks the current
position before jumping to each match, and then marks the match
position. A second search sees the mark at current position and doesn't
duplicate it. Each press of alt-shift-B undoes each match, and
alt-shift-N redoes each match.


> > For key recommendations, I use alt-shift-QWE to go-back/go-forward/set
> > bookmarks and alt-shift-BNM to go-back/go-forward/set return points.
>
> Hm.  I would have thought the other way around, as return points are more
> closely related to searching.

Sure, but QW are implants that search for the bookmark. The only code is 
a patch that adds a search flag to disable saving a query to search
history (hide). It also saves current case/regex flags, clears them so
implant has a clean slate, and restores them after searching.

I use both bookmarks and return points daily but use bookmarks more
frequently and a three-finger Q/W is easier to press than a three-finger
B/N.


> To mimic your return points, we could add an "anchoronsearch" option, or
> simply do that always, by default.

That would spam the buffer with anchors and reduce their usability. My
return points are stored in a 16 entry ring which wraps around and
overwrites oldest points. When you search and then jump back, it
tracks the current point, doing a second search overwrites the points
set by the previous search. Return points also store cursor position,
not just the line.



reply via email to

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