-
Notifications
You must be signed in to change notification settings - Fork 84
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
Don't use control keys when editing a pattern, so we can use readline's #143
Comments
Sorry, I'm not quite understanding this. less doesn't use readline, since it's built in many environments where readline is not available. It uses control chars for the search modifiers because control chars are less likely to appear in a search pattern. There are a set of sequences starting with ESC that can be used to edit the pattern if you can't or don't want to use arrow keys and the like (eg. ESC-0 to move to start of line, ESC-l to move left, etc; see the man page or help screen for the full list). |
All I know is perl and grep can do all those things without needing control characters to do them.
where the "m" is optional. And grep can do highlighting... Anyways all I know is ^A should go to the beginning of line. Anyways, consider allowing the readline people to use readline. |
You could add the commands you want to the #line-edit section of your lesskey file. For example
would make ^A go to the beginning of the line. See LINE EDITING SECTION in the lesskey man page for more details. |
Well if less finally got on the readline bandwagon, then all the VI
people (not only emacs people) would be able to have their bindings too,
without needing to tinker with individual files for individual programs.
Yes, there are systems that don't use readline. But that shouldn't spoil
it for those systems that do.
|
In case it'll be useful to someone else who finds this thread, here's what I ended up putting into
Some keys are conspicuously missing ( |
Make Less behave a bit more like programs that use GNU Readline do. gwsw/less#143 https://en.wikipedia.org/wiki/GNU_Readline
Please don't use control keys here. [less 551.]
Control keys should be for 'readline' editing of the pattern.
Currently all that still works are the arrow keys when editing a
pattern.
No other program is so control-key hungry.
Anyway, I can't use ^A to get to the beginning of the pattern due to
this. I must hold down the left arrow instead. etc.
Make you a deal: how about ^^k = ^K, ^^r = ^R, etc. I.e., allow two ASCII ^'s, and a k, to do the same thing as your current CTRL-K. OK, that might cause "no way to match a ^ at the beginning of a line". OK, then use something else.
The text was updated successfully, but these errors were encountered: