I'm trying to do some formatting to some man pages and I need to add
] hfill \\
to certain headers. I want to make this
NAME
env - run a program in a modified environment
SYNOPSIS
env [-] [-i] [-u name] [--ignore-environment]
[--unset=name] [name=value]... [command [args...]]
DESCRIPTION
This manual page documents the GNU version of env. env
runs a command with an environment modified as specified
by the command line...
into this
\item[NAME] \hfill \\
env - run a program in a modified environment
\item[SYNOPSIS] \hfill \\
env [-] [-i] [-u name] [-\hspace{.01cm}-ignore-environment]
[-\hspace{.01cm}-unset=name] [name=value]... [command [args...]]
\item[DESCRIPTION] \hfill \\
This manual page documents the GNU version of env. env
runs a command with an environment modified as specified
by the command line...
I got the "\item[" part down but I can't get the other half for whatever reasons. The command I'm using:
/[A-Z]/s/$/\] \\hfill \\\\/
works but shows up on lines I don't want.
/[A-Z]/matches any line with a capital letter. Did you want it to be/^\\item\[[A-Z]/so that it only matches a capital letter that follows\item[