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'Written by Adam Stankiewicz
Related protips
3 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#