Quantcast

unexpected behavior

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

unexpected behavior

Edgar Pettijohn III-2
I think this may be normal, but I can't seem to find it documented
anywhere.  While viewing a man page in xterm if I hit the 'v' key it
appears to open it for editing in vi. I did so accidentally recently and
at first I thought I broke something because of all the
"F^HFI^HIL^HLE^,etc" which I assume are man markup characters. I looked
around for documentation on this "feature", but I'm not sure where to
look vi, mandoc, xterm? So is this a bug somewhere or expected behavior?

Thanks,


Edgar

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unexpected behavior

Mike Burns
On 2017-05-15 18.57.57 -0500, Edgar Pettijohn wrote:
> I think this may be normal, but I can't seem to find it documented anywhere.
> While viewing a man page in xterm if I hit the 'v' key it appears to open it
> for editing in vi. I did so accidentally recently and at first I thought I
> broke something because of all the "F^HFI^HIL^HLE^,etc" which I assume are
> man markup characters. I looked around for documentation on this "feature",
> but I'm not sure where to look vi, mandoc, xterm? So is this a bug somewhere
> or expected behavior?

less(1)

  _v_
  Invokes an editor to edit the current file being viewed. The editor is
  taken from the environment variable VISUAL, if defined, or EDITOR if
  VISUAL is not defined, or defaults to "vi" if neither VISUAL nor
  EDITOR is defined.

http://man.openbsd.org/less#v

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unexpected behavior

Ingo Schwarze
In reply to this post by Edgar Pettijohn III-2
Hi Edgar,

Edgar Pettijohn wrote on Mon, May 15, 2017 at 06:57:57PM -0500:

> I think this may be normal, but I can't seem to find it documented anywhere.
> While viewing a man page in xterm if I hit the 'v' key it appears to open it
> for editing in vi. I did so accidentally recently and at first I thought I
> broke something because of all the "F^HFI^HIL^HLE^,etc" which I assume are
> man markup characters. I looked around for documentation on this "feature",
> but I'm not sure where to look vi, mandoc, xterm? So is this a bug somewhere
> or expected behavior?

It may be less(1) expected than you think, but it is.

Actually editing the file is not very useful because it's a tmp file.
To get out of vi(1) again, just use the normal ":q".

For documentation, see

  http://man.openbsd.org/less#v

or type "man less", then hit the keys ENTER, COLON, t, v, ENTER.

If you don't like all that, you can set

 $ export LESSEDIT=false

Yours,
  Ingo

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unexpected behavior

Edgar Pettijohn III-2


On 05/15/17 19:18, Ingo Schwarze wrote:

> Hi Edgar,
>
> Edgar Pettijohn wrote on Mon, May 15, 2017 at 06:57:57PM -0500:
>
>> I think this may be normal, but I can't seem to find it documented anywhere.
>> While viewing a man page in xterm if I hit the 'v' key it appears to open it
>> for editing in vi. I did so accidentally recently and at first I thought I
>> broke something because of all the "F^HFI^HIL^HLE^,etc" which I assume are
>> man markup characters. I looked around for documentation on this "feature",
>> but I'm not sure where to look vi, mandoc, xterm? So is this a bug somewhere
>> or expected behavior?
> It may be less(1) expected than you think, but it is.
>
> Actually editing the file is not very useful because it's a tmp file.
> To get out of vi(1) again, just use the normal ":q".
>
> For documentation, see
>
>    http://man.openbsd.org/less#v
>
> or type "man less", then hit the keys ENTER, COLON, t, v, ENTER.
>
> If you don't like all that, you can set
>
>   $ export LESSEDIT=false
>
> Yours,
>    Ingo
Thanks to Ingo and Mike.  After reading your replies I vaguely recall
reading that in the past.

Loading...