Monday, June 30, 2014

Re: Tabstop for python on mac for vim 7.4 messed up

On Monday, June 30, 2014 4:18:09 PM UTC-5, Sid wrote:
> Hi,
>
> I'm using vim 7.4 on the Mac. In my .vimrc, I set the tabstop to 4. However if I have the line "filetype plugin on" (which I really need), then the tabstop for python (but not for c++, java, c, julia) is being set to 8. This is happening both with MacVim as well as the brew install version.
>
> This does not happen with Vim 7.3, neither for the OSX default nor for MacVim.
>
> Help would be greatly appreciated!
> Thanks!

Probably the python filetype plugin is setting a tabstop for you, which as Gary says I think is intentional. The filetype plugin says:

" As suggested by PEP8.
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8

If you don't like that, then set up a FileType autocmd to fix it:

autocmd FileType python setlocal tabstop=8

--
--
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: