LaTeX-Box-Team / LaTeX-Box

Lightweight Toolbox for LaTeX - New Official repository
http://www.vim.org/scripts/script.php?script_id=3109
GNU General Public License v3.0
396 stars 66 forks source link

Indentation does not work with completion #185

Closed dane-unltd closed 10 years ago

dane-unltd commented 10 years ago

Maybe this is a known problem, but I did not find anything on it. When I use omnicomplete to complete an indentation key like \item it is not properly indented.

lervag commented 10 years ago

I'm not sure I understand what you mean. You expect that \item should be automatically indented properly after it is inserted from omnicompletion?

First: Omnicompletion in LaTeX-Box only completes references, not commands such as \item. You're probably referring to keyword completion or similar. This is a vim feature, not a LaTeX-Box feature.

lervag commented 10 years ago

Ah, sorry, I forgot: LaTeX-Box really do support command completion through omnicomplete.

dane-unltd commented 10 years ago

You expect that \item should be automatically indented properly after it is inserted from omnicompletion?

Yes. It is not a huge issue since it is really only relevant for \item which is not such a long word anyway, but maybe for you guys this is easy to fix.

lervag commented 10 years ago

I see. I don't think this is an issue with LaTeX-Box. I think you can get the desired feature by use of an autocommand, something like:

augroup vimrc
  autocmd! " This clears the current augroup
  autocmd CompleteDone *.tex norm ==
augroup END

I am not sure if that will work, in fact I think it might not. But you're welcome to try it or something similar. As I said, I don't think this is an issue that needs to be fixed. Sorry.