I would use the text to columns feature of excel to break them out. Just ensure that you have empty columns to the right of your data.
now highlight column B and select text to columns
Choose delimited on screen one
after you hit finish, your data should now look like
I think you can do this with the 'formatlistpat' option set to include the paragraph-delimiting tags. You need to include 'n' in 'formatoptions' for that to work. See
For example, with
formatting your example produces this:
\item this might be a long paragraph
that spans multiple lines
Note that the second line of the first item is indented by the length of the
\item tag, so it's not exactly what you wanted, but it might be close enough. You might also experiment with
\ze as mentioned in the help to see if you can get Vim to recognize the tag without indenting the subsequent lines. I didn't try that.
The 'formatlistpat' is a little clearer, and easier to edit, if it is set using
:let instead of
:let &l:flp = '^\s*\\\(end\|item\)\>'
l: portion specifies that it is a buffer-local setting.
To reduce the indent down to 1 character, do this:
:let &l:flp = '^\s*\\\ze\(end\|item\)\>'
Note that if there are any white spaces before the
\item, then the indent becomes that number + 1. I don't know if it's possible to reduce the indent down to 0 using the
You can do a search and replace. I just wrote this out. It works, but you could probably do better.