Using gq with "-" lists in comments

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Using gq with "-" lists in comments

Eric Pruitt
When using "gq" to format text, Vim treats lines lines starting with "-"
as lists and pads the line with whitespace for subsequent lines to align
the text so this:

    - The quick brown fox jumps over the lazy dog

... becomes this:

    - The quick brown fox jumps
      over the lazy dog

When wrapping text inside of comments in various languages (usually C,
Awk and Python), the same thing does not happen so this:

    # - The quick brown fox jumps over the lazy dog

... becomes this:

    # - The quick brown fox jumps
    # over the lazy dog

... when what I want is this:

    # - The quick brown fox jumps
    #   over the lazy dog

Is it possible to get the behavior I want without writing a custom
fmt-esque command?

Eric

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.