Last Updated: February 25, 2016
·
3.586K
· sheerun

Less command: edit file shortcut

If you press v during viewing file with less utility, it'll open an editor.

You can choose the editor by setting LESSEDIT variable. For example:

export LESSEDIT='subl %f'

3 Responses
Add your response

Standard VISUAL and EDITOR variables usually have this covered.

over 1 year ago ·

@dmedvinsky They probably don't accept such parameters as %f

over 1 year ago ·

@sheerun True, but %f isn't interesting, it is passed anyway so that file is opened. What might be interesting is %lm or %lt. In case you want to use them, then yes, LESSEDIT it is.

over 1 year ago ·