I use the :gwap command a lot. I'd like to fine-tune it.
Can the following be done? I'd like to reformat only those
lines with the same indentation (and keep the indent).

I tend to write a lot of HTML and documentation
with indented blocks. For example:

hive.py
    This script creates SSH connections to a list of hosts that you
    provide. Then you are given a command line prompt. Each
    shell command that you enter is sent to all the hosts.
    The response from each host is collected and printed. For
    example, you could connect to a dozen different machines and reboot
    them all at once.

When I hit :gwap in the body of the paragraph I get this:

hive.py This script creates SSH connections to a list of hosts that you
provide. Then you are given a command line prompt. Each shell command
that you enter is sent to all the hosts. The response from each host is
collected and printed. For example, you could connect to a dozen different
machines and reboot them all at once.

I want two thing to happen instead. First, I would like the indent to
be preserved. Second, I would like it to only format the indented paragraph
and not "leak" into the previous non-indented line. In other words I would
like to define a parahraph as only those line with the same indent
(yes, I'm a Python programmer ;-). So, what I would like to see is this:

hive.py
    This script creates SSH connections to a list of hosts that
    you provide. Then you are given a command line prompt. Each
    shell command that you enter is sent to all the hosts. The
    response from each host is collected and printed. For example,
    you could connect to a dozen different machines and reboot
    them all at once.

Yours,
Noah


Reply via email to