> When starting an ordered list::
>
> 1. hello
>
> with two spaces between the ``1.`` and the ``hello``, pressing Return
> at the end of the line leads to an indentation by four spaces, s.t.
> the cursor is located directly beneath the beginning of ``hello``.
> Other amounts of space between the ``1.`` and the ``hello`` are
> respected as well.
>
> However, when writing unordered lists::
>
> * hello
>
> or::
>
> - hello
>
> or::
>
> + hello
>
> with three spaces between the bullet marker and the word "hello",
> pressing Return leaves the cursor indented with two spaces. This is
> independent on the number of spaces between the marker and the text.
>
> It is easy enough to indent manually when writing such paragraphs.
> However, when reflowing paragraphs in an unordered list by ``gq`` in
> "visual line" mode (``V``), it is a little tedious to reformat the
> paragraph starting at its second line, after the first line is
> complete.
>
> Would it be possible to change vim's behaviour in this respect?
You don't mention what option values you use, but you should be able to
make it work by:
include the "n" flag in 'formatoptions'
Adjust the 'formatlistpat' option, e.g. to use a list with "+":
set formatlistpat=^\\s*\\(\\d\\+[\\]:.)}\\t\ ]\\\\|+\\)\\s*
--
There is a fine line between courage and foolishness.
Unfortunately, it's not a fence.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202105141458.14EEwA8v3078557%40masaka.moolenaar.net.