On 2/15/19 11:19 AM, Oleg Pahl wrote:
> Hi @all,
> 
> Today I try to work with man pages using *vim*.

What do you mean with work with? Do you mean you want to edit them, or
you want to read them?
If you want to edit them, just edit the source
/usr/src/usr.bin/mandoc/man.1 (you need to have a local copy of the
repo).
> 
> *# man man | vim -*
> 
> why i see raw (a lot of special char.) data by default? is it ok?

Yes, those chars are used to create the pretty formatting (e.g. bold
printing or underlining).
> 
> *# ma man | less *
> 
> I see no special characters. looks very good.

less doesn't interpret those characters and blindly forwards them to
the terminal, allow you to see nicely formatted text.
> 
> Is it possible to convert *raw* data of man page to normal format (for *vim*) 
> with one command?
> 
I'm not 100% sure what you want to do, but if you want it to be a
little more readable in vim, the following command helps:
:%s/.^H//g
Note that ^H can be achieved via control+v+h
> BR,
> 
> -op
> 
martijn@

Reply via email to