Sunday, September 21, 2014

Re: Indentation problem

On 2014-09-21 07:30, Guido Milanese wrote:
> Please excuse me for asking this very trivial question, which I'm
> afraid has already been discussed, but I got confused browsing
> manuals, wiki and group.

No problem -- it's non-trivial, so it's certainly a good/worthwhile
question for the list.

> I have a file of notes about books I have studied and I would like
> to obtain this structure (PN = real page numbers):
>
> PN[TAB]my notes
>
> If the "my notes" field spans over more than one line, I would like
> the continuation lines to be indented aligned at the TAB position,

It sounds like you're looking for the 'showbreak' option. While it's
not perfect and doesn't work so well for more than one tab-stop worth
of indentation, you can do something like

:let &showbreak=repeat(' ', &ts)

which will display (rather than insert) extra &tabstop number of
spaces at the front of wrapped lines. It will break if you have more
than one tab, or if the page-number exceeds the width of a tab.

-tim





--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment