I hated the white-space thing until I discovered that. For whatever reason this made me get over myself and learn to love the tab/space argument that is somewhat akin to the vi/emacs argument.
I hated the white-space thing until I discovered that. For whatever reason this made me get over myself and learn to love the tab/space argument that is somewhat akin to the vi/emacs argument.
Every time I think about tabs/spaces, I think about that episode in Silicon Valley [1]. Hilariously accurate, I have the exact same feeling when somebody uses the mouse to copy something or navigate. The cringe makes me feel alive (I guess this is the ultimate reason for those flamewars. And neurotic tendencies, of course).
:set ts=8 sts=0 sw=8 expandtab
I have secrets. command Tab1 set ts=1 sts=1 sw=1
command Tab2 set ts=2 sts=2 sw=2
command Tab4 set ts=4 sts=4 sw=4
command Tab8 set ts=8 sts=8 sw=8 command! Tab1 set ts=1 sts=1 sw=1
command! Tab2 set ts=2 sts=2 sw=2
command! Tab4 set ts=4 sts=4 sw=4
command! Tab8 set ts=8 sts=8 sw=8
The ! exclamation mark is there to prevent vim from complaining about a duplicate command already existing whenever you reload your vimrc.:set tabstop=4
:set shiftwidth=4
:set expandtab
Like a pleb for years. What's sts?
Number of spaces that a <Tab> counts for while performing editing operations, like inserting a <Tab> or using <BS>. It "feels" like <Tab>s are being inserted, while in fact a mix of spaces and <Tab>s is used. This is useful to keep the 'ts' setting at its standard value of 8, while being able to edit like it is set to 'sts'. However, commands like "x" still work on the actual characters.
When 'sts' is zero, this feature is off.
You can also abbreviate expandtab to et.
Hint: searching GitHub for "dotfiles" can be a fun and productive way to spend a Friday afternoon :-)
She's obviously the smarter one: Vim and (4) Spaces ftw.