NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/60010: "expandtab" behaves counter-intuitively (and different from vim)
> On Feb 16, 2026, at 10:55 AM, Valery Ushakov via gnats <gnats-admin%NetBSD.org@localhost> wrote:
>
> If your muscle memory is that of vim, then use vim. Consider that
> other people may have different muscle memory and you are proposing to
> ruin theirs.
Well, this really only comes into play when you’re working on a code base that doesn’t conform to KNF (were the Tab vs Control-T distinction is pretty much meaningless). *This* is where my muscle memory comes from, 30 years of writing/editing KNF-conforming code with the default ts=8, where hitting the Tab key absolutely does the right thing and Control-T simply isn’t necessary.
Like, it’s been so “out of sight out of mind” that I had completely forgotten about the sw property because with KNF-conforming code you simply don’t have to care.
The other thing that irks me about the current situation: the setting in question is called “expandtab”, not “expandcontrolt” to “expandtoshiftwidth”.
The issue only came up for me recently because I’ve been working on a code base that is in a sort of hybrid GNU/KNF style, which uses 2-space tabs and all indents are expanded to spaces. My assumption is that the original author wrote it using emacs, although none of the usual emacs formatting markup is present in any of the files.
In any case, I would be happy enough with something I could put into my ~/.exrc (which for the last 30 years has read "set ai nomagic sm”) to enable what I would term “rational expandtab behavior”. That way no one else’s muscle memory would be disturbed.
-- thorpej
Home |
Main Index |
Thread Index |
Old Index