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
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/5624/cd02928b9714479b681d1d24bb6360d7.jpeg)
Standard VISUAL
and EDITOR
variables usually have this covered.
over 1 year ago
·
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/13006/Photo_on_08.01.2013_at_04.15.jpg)
@dmedvinsky They probably don't accept such parameters as %f
over 1 year ago
·
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/5624/cd02928b9714479b681d1d24bb6360d7.jpeg)
@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#