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

Allow ESC-e to invoke the sequence "g|$$EDITOR -" #66

Closed
rfagen opened this issue May 28, 2020 · 2 comments
Closed

Allow ESC-e to invoke the sequence "g|$$EDITOR -" #66

rfagen opened this issue May 28, 2020 · 2 comments

Comments

@rfagen
Copy link

rfagen commented May 28, 2020

While wandering the internet, I saw an interesting workaround to being able to edit STDIN while using less.

I would like to propose adding an ESC-e command (which doesn't appear to be in use as of version 458) to stuff the keyboard with the sequence: g|$$EDITOR -

Or, maybe even: g|$${VISUAL:-$EDITOR} - which I'm amazed I was able to get correct the first time I typed it...

@gwsw
Copy link
Owner

gwsw commented May 28, 2020

This would work only when the editor supports editing stdin, and uses the "-" syntax to do it. Since this is not universal (for example, my version of emacs does not support it), it's probably not appropriate for a general release. However you can get the same effect by putting this line in your lesskey file:
\ee goto-line |$${VISUAL:-$EDITOR} -\n

@rfagen
Copy link
Author

rfagen commented May 28, 2020

Ah! Cool. TIL -- there's a lesskey file

Thank you, by the way for so much less :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants