I think lots of vim users aren’t aware of this fact, that’s why I said I’m sure most people are fine with your implementation. Heck, even though I know about it, I also set my
softtabstop to the same value.
The main reason I bothered writing this was to support the most useful part of
softtabstop for me — if I press
<backspace> on some whitespace, I want it to erase whitespace until the cursor reaches a display column that is a multiple of
softtabstop or a non-whitespace character, whichever is first. That’s not something your plugin supports, and none of the suggestions in the various issues discussing
expandtab on kakoune’s github repo addressed that. Along the way, I decided I might as well support vim’s approach fully, especially since as a side project I started contributing to an open source repo that happened to use tabs rather than spaces.
I appreciate that, but I’m not sure it makes sense. To contribute my changes would likely mean replacing everything in
rc/smarttab.kak with what I’ve written (except your code for displaying the current
<tab> mode in the modeline).
I guess I could break my code out into a proper plugin file if it becomes popular enough and people want it. I didn’t go that route since I’ve tried to adopt a more minimalistic philosophy with my usage of kakoune, so I don’t currently use plugins (or a plugin manager) like I did with vim (though I do use
A deeper dive for the truly curious
In case you’re interested, the second sentence of the option description when you type
:help softtabstop in vim mentions it adds a mix of
<spaces>. Additionally, the documentation for
tabstop strongly cautions against changing
tabstop from it’s default value of
8 and to just set
softtabstop to your desired value. The reasoning? To provide better support for printing text edited in vim — that seems like a very infrequent occurrence to me. Vim also has a
smarttab option which conflict’s with smarttab.kak’s approach.
NOTE: I would have included more links, but apparently as a new user I’m limited to at most two links in a post/comment.