Ticket #3452 (closed enhancement: fixed)

Opened 10 years ago

Last modified 6 years ago

mcview: quick one-off backwards search with N

Reported by: egmont Owned by: andrew_b
Priority: minor Milestone: 4.8.23
Component: mcview Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

In mcview I often search for a string and press 'n' multiple times to find a desired occurrence, and every once in a while I press it too many times and wish to go back by one or two.

Invoking the search dialog and enabling "Backwards" is cumbersome, let alone that after this operation I'll have to invoke it again to disable it.

In the mean time, uppercase 'N' doesn't do anything.

I recommend implementing searching in the opposite direction for Shift+N (that is: backwards if forward search is chosen in the search dialog, and vice versa), as it's done e.g. in "less".

Change History

comment:1 Changed 10 years ago by andrew_b

mc.default.keymap

354 [viewer]

360 Search = f7
361 SearchForward = slash
362 SearchBackward = question
363 SearchContinue = f17; n
364 SearchForwardContinue = ctrl-s
365 SearchBackwardContinue = ctrl-r

comment:2 Changed 10 years ago by egmont

Thanks, I wasn't aware of ctrl-s / ctrl-r.

What I'm ideally wishing for is a

SearchOpposite = shift-n

When my right index finger is already on "N", it's much easier to press Shift too rather than changing to something completely different. Also, I'd like it to go in the opposite direction just on a one-off basis, without changing the overall default direction of the search, and without having to think about where I went so far and so whether I need ctrl-s or ctrl-r. Kinda like an "undo" button.

comment:3 follow-up: ↓ 4 Changed 10 years ago by ossi

that would be SearchOppositeContinue ...

anyway, i support that idea.

what about the editor? plain letters aren't an option there, obviously.

comment:4 in reply to: ↑ 3 Changed 10 years ago by egmont

that would be SearchOppositeContinue ...

Indeed. I wasn't sure about the name because I wanted to reflect that the direction is not permanently altered. Although the word "Continue" refers to not bringing up the popup, so it should remain in the name.

what about the editor? plain letters aren't an option there, obviously.

Dunno, any opinion from a heavy mcedit user? What about e.g. Ctrl+F7?

(I myself use mcview very often, but prefer an external editor to mcedit. I believe it's already an improvement if mcview receives this feature and mcedit doesn't (or is not bound by default). But feature parity is a fair request.)

comment:5 Changed 6 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.23

Branch: 3452_mcview_search_opposite
changeset:99a7a968d2895ebad56271523dcc1d526e2c0a15

Please review.

Version 0, edited 6 years ago by andrew_b (next)

comment:6 Changed 6 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:7 Changed 6 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:8 Changed 6 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.