:set smarttab and TeX
Since I've installed sensible, vim adds an extra indentation after every line starting with \item (on .tex files), which is quite inconvenient. Even stranger:
- when I started this issue, every new \item had one indentation more than the previous
- then after switching autoindent, smarttab smartindent off and on I found that smarttab was the guilty option, the extra indent came only to the lines following an \indent but if the line starts with \item the extra indent goes off
- when I'm opening a new .tex file (without any changes in my .vimrc) there is no added indentation but the option remains in the other .tex file even after closing and reopening it.
Can't reproduce. What are the values of 'shiftwidth' and 'softtabstop'?
shiftwidth=4, softtabstop=4.
It's very strange, I can't reproduce this effect in an other file neither.
Might want to check the filetype (tex vs plaintex).
On Sun, Dec 29, 2013 at 10:47 AM, lvaneesbeeck [email protected]:
shiftwidth=4, softtabstop=4.
It's very strange, I can't reproduce this effect in an other file neither.
— Reply to this email directly or view it on GitHubhttps://github.com/tpope/vim-sensible/issues/67#issuecomment-31319206 .
Right! The auto indentation is set with filetype=tex, while filetype=plaintex doesn't make it. How can I change the default filetype/where can I find what's done with a particular filetype?
Thanks!
It'll be in $VIMRUNTIME in either ftplugin/tex.vim or indent/tex.vim. You can override with a corresponding file in ~/.vim/after.
I can't reproduce with either filetype, and I'll stress that 'smarttab' is unlikely to be the culprit, as the only thing it changes is what happens when you hit the tab key on your keyboard.