Tuesday, September 10, 2019

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

Hi!

On Mon, 09 Sep 2019, 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.

This might be a generic change (i.e. not Python-specific). The
option that makes vim convert tabs to spaces is "expandtab":

'expandtab' 'et' boolean (default off)
local to buffer
In Insert mode: Use the appropriate number of spaces to insert a
<Tab>. Spaces are used in indents with the '>' and '<' commands and
when 'autoindent' is on. To insert a real tab when 'expandtab' is
on, use CTRL-V<Tab>. See also :retab and ins-expandtab.
This option is reset when the 'paste' option is set and restored when
the 'paste' option is reset.
NOTE: This option is reset when 'compatible' is set.

I'd search their top-level vimrc for this. If you don't want to
bother or worry that your changes will be overwritten, you can
put "set noexpandtab" in your .vimrc (user-level).

Hope this helps,
Tobias

--
Sent from aboard the Culture ship
GCU Just Another Victim Of The Ambient Morality

--
--
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/20190910080946.GA28211%40skade.schwarzvogel.de.

No comments: