Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:set smarttab and TeX #67

Open
lvaneesbeeck opened this issue Dec 29, 2013 · 5 comments
Open

:set smarttab and TeX #67

lvaneesbeeck opened this issue Dec 29, 2013 · 5 comments

Comments

@lvaneesbeeck
Copy link

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.
@tpope
Copy link
Owner

tpope commented Dec 29, 2013

Can't reproduce. What are the values of 'shiftwidth' and 'softtabstop'?

@lvaneesbeeck
Copy link
Author

shiftwidth=4, softtabstop=4.

It's very strange, I can't reproduce this effect in an other file neither.

@tpope
Copy link
Owner

tpope commented Dec 29, 2013

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//issues/67#issuecomment-31319206
.

@lvaneesbeeck
Copy link
Author

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!

@tpope
Copy link
Owner

tpope commented Dec 29, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants