Thursday, September 12, 2019

Re: [OT(?)] Ubuntu 18 now defaults to 4-space tabs

Hi,

2019/9/10 Tue 16:01:30 UTC+9 Tobiah wrote:
We upgraded a server to 18.04 and now when I start typing
a python file (seems to be triggered by the .py extension)
the tabs default to 4 spaces.  We have decades of code that
use tab characters, and it has not been our intention to
change that.

I found a /usr/share/vim/vim80/indent/python.vim and tried
moving it out of the way, but the behavior was still there.

I know I can put a modeline in every file but I was hoping
to do it for every user and for every file.


Thanks!

Recent version of ftplugin/python.vim has the following lines:
https://github.com/vim/vim/blob/8fe1000e9c3438d0ff36cf2340f0f0e48f8fb89f/runtime/ftplugin/python.vim#L116-L119

So, if you don't want do use the recommended indent style,
write the following setting in your .vimrc:

  let g:python_recommended_style = 0

Older versions of ftplugin/python.vim may not have the setting.
Then you may need to overwrite the recommended setting by autocommand or some other way.

Regards,
Ken Takata
 

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/7d598eb1-735c-42e9-b75e-88890c22d819%40googlegroups.com.

No comments:

Post a Comment