Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcview: quick one-off backwards search with N #3452

Closed
mc-butler opened this issue Apr 16, 2015 · 8 comments
Closed

mcview: quick one-off backwards search with N #3452

mc-butler opened this issue Apr 16, 2015 · 8 comments
Assignees
Labels
area: mcview mcview, the built-in text editor prio: low Minor problem or easily worked around
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3452
Reporter egmont (@egmontkob)

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".

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Apr 16, 2015 at 17:05 UTC (comment 1)

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

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Apr 16, 2015 at 17:19 UTC (comment 2)

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.

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Apr 19, 2015 at 9:55 UTC (comment 3)

that would be SearchOppositeContinue ...

anyway, i support that idea.

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

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Apr 19, 2015 at 12:49 UTC (comment 3.4)

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.)

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Apr 20, 2019 at 15:46 UTC (comment 5)

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

Branch: 3452_mcview_search_opposite
[7ddd4e9]
Please review.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on May 9, 2019 at 12:44 UTC (comment 6)

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on May 9, 2019 at 12:45 UTC (comment 7)

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

Merged to master: [5cde979].

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on May 9, 2019 at 12:48 UTC (comment 8)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcview mcview, the built-in text editor prio: low Minor problem or easily worked around
Development

No branches or pull requests

2 participants