Stahlman Family wrote:


AK wrote:
Brett Stahlman wrote:
On Mar 16, 7:31 am, Rainy <[email protected]> wrote:
Hi, I'm trying to use 'formatlistpat' to format unordered lists with
'-' as a bullet:

 :set flp=^\s*-\s*

You need to escape the backslashes...
:set flp=^\\s*-\\s*

:help option-backslash

Also, be sure the 'n' flag is present in 'formatoptions'.

Brett Stahlman

Thanks for the reply. That was indeed a problem with my pattern, but I tried it now escaping exactly as you say, and it doesn't work still. I do have 'n' in 'fo'. It basically indents as if '-' wasn't there. I tried both escaping and double-escaping the '-' (and not escaping, too, of course).

Ak,
Also, 'autoindent' must be set, and 'textwidth' must be set to a nonzero value. Note that the bulleting/numbering is triggered by automatic indenting due to textwidth being exceeded, not by hitting Return in insert mode (which in a list, typically means you're ready to enter the next number or bullet). Can you describe how you're attempting to trigger the indent, exactly?

Thanks,
Brett Stahlman

Excellent, it does work when exceeding tw and with 'gq' command. I was in fact trying to trigger it with Return and didn't realize that wouldn't work.. Thanks very much, this was a big annoyance to me for a while..

-ak

--
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

Reply via email to