Skip to main content
Some minor improvements
Source Link
Martin Tournoij
  • 63.3k
  • 26
  • 199
  • 274

When I type 1. blah blah blah VIMVim recognizes the 1. prefix and it indents the rest of the paragraph tidy.

I would like to configure Vim to do the same thing with #. literal prefix, since ReST files autonumbers the paragraphs when started with #..

In this SO answer I got suggested this:

let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

I added this to my .vimrc:

autocmd BufRead,BufNewFile *.rst let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

It doesn't work. In fact, I modified the regexp and VIMVim seems to ignore anything I put there.

When I type 1. blah blah blah VIM recognizes the 1. prefix and it indents the rest of the paragraph tidy.

I would like to configure Vim to do the same thing with #. literal prefix, since ReST files autonumbers the paragraphs when started with #..

In this SO answer I got suggested this:

let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

I added this to my .vimrc:

autocmd BufRead,BufNewFile *.rst let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

It doesn't work. In fact, I modified the regexp and VIM seems to ignore anything I put there.

When I type 1. blah blah blah Vim recognizes the 1. prefix and it indents the rest of the paragraph tidy.

I would like to configure Vim to do the same thing with #. literal prefix, since ReST files autonumbers the paragraphs when started with #..

In this SO answer I got suggested this:

let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

I added this to my .vimrc:

autocmd BufRead,BufNewFile *.rst let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

It doesn't work. In fact, I modified the regexp and Vim seems to ignore anything I put there.

added 4 characters in body; edited tags; edited tags; edited tags
Source Link
Martin Tournoij
  • 63.3k
  • 26
  • 199
  • 274

When I type "1. blah blah blah"1. blah blah blah VIM recognizes the "1."1. prefix and it indents the rest of the paragraph tidy.

I would like to configure VIMVim to do the same thing with "#."#. literal prefix, since ReST files autonumbers the paragraphs when started with "#."#..

In https://stackoverflow.com/questions/29907651/indentation-with-start-of-paragraph?noredirect=1#29907651this SO answer I got suggested this:

let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

I added this to my .vimrc:

autocmd BufRead,BufNewFile *.rst let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

autocmd BufRead,BufNewFile *.rst let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

It doesn't work. In fact, I modified the regexp and VIM seems to ignore anything I put there.

Help!.

When I type "1. blah blah blah" VIM recognizes the "1." prefix and it indents the rest of the paragraph tidy.

I would like to configure VIM to do the same thing with "#." literal prefix, since ReST files autonumbers the paragraphs when started with "#.".

In https://stackoverflow.com/questions/29907651/indentation-with-start-of-paragraph?noredirect=1#29907651 I got suggested this:

let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

I added this to my .vimrc:

autocmd BufRead,BufNewFile *.rst let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

It doesn't work. In fact, I modified the regexp and VIM seems to ignore anything I put there.

Help!.

When I type 1. blah blah blah VIM recognizes the 1. prefix and it indents the rest of the paragraph tidy.

I would like to configure Vim to do the same thing with #. literal prefix, since ReST files autonumbers the paragraphs when started with #..

In this SO answer I got suggested this:

let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

I added this to my .vimrc:

autocmd BufRead,BufNewFile *.rst let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

It doesn't work. In fact, I modified the regexp and VIM seems to ignore anything I put there.

Source Link
jcea
  • 133
  • 3

Indentation with "#." start of paragraph

When I type "1. blah blah blah" VIM recognizes the "1." prefix and it indents the rest of the paragraph tidy.

I would like to configure VIM to do the same thing with "#." literal prefix, since ReST files autonumbers the paragraphs when started with "#.".

In https://stackoverflow.com/questions/29907651/indentation-with-start-of-paragraph?noredirect=1#29907651 I got suggested this:

let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

I added this to my .vimrc:

autocmd BufRead,BufNewFile *.rst let &formatlistpat = '^\s*\%(\d\+\|#\)[\]:.)}\t ]\s*'

It doesn't work. In fact, I modified the regexp and VIM seems to ignore anything I put there.

Help!.