2

I've recently been playing with the LaTex-Box plugin for Vim and noticed the layout of the source code on their Github page: sexy source code

What interests me is the 2-space hanging indent within each sentence. That would be a massive pain unless something automatic like gq handled it. But I haven't been able to find anything mentioning it and any formatting commands using LaTeX-Box (assuming I've got it set up correctly) have not resulted in the hanging indent.

Is there something I've screwed up with LaTeX-Box, or is there some other script/plugin/etc. that does this? Maybe just a mapping/function of some kind? Again, I do not need general formatting/indentation, just this specific application.

1

I have resorting to the following solution: a mapping to add the hanging indent, then the usual gqq, or whatever your preference is, to handle the word wrap. This should perpetuate the hanging indent.

Mapping in .vimrc or somewhere else if you want it to be (La)TeX specific:

nnoremap <c-i> JgqqI<space><space><Esc>

The visual style of breaking up the sentences has really grown on me, but I got sick of doing it manually. Hooray for Vim and bindings.

  • Oh no, those emacs/vim thingies again – percusse Jan 18 '16 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.