ob5v9g
Last Updated: February 25, 2016
·
2.455K
· sheerun
Photo on 08.01.2013 at 04.15

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'
Say Thanks
Respond

3 Responses
Add your response

2584
Cd02928b9714479b681d1d24bb6360d7

Standard VISUAL and EDITOR variables usually have this covered.

over 1 year ago ·
2587
Photo on 08.01.2013 at 04.15

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

over 1 year ago ·
2595
Cd02928b9714479b681d1d24bb6360d7

@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 ·
Filed Under