andreyorst / smarttab.kak

Automatic handling different styles of indentation and alignment.
MIT License
62 stars 4 forks source link

Make tab key indent by indentwidth #9

Closed valpackett closed 4 years ago

valpackett commented 4 years ago

Doesn't make sense to always indent by 2..

andreyorst commented 4 years ago

old code indents by tabstop size, not by 2

valpackett commented 4 years ago

But tabstop is supposed to only apply to the visual width of an actual \t, right? I think it makes more sense to indent by indentwidth

andreyorst commented 4 years ago

The Idea was that you insert \t character anyway, because this is what Kakoune does, and the plugin decides what to do with it.

I always kept indentwidth and tabstop to be the same size. Do you have a usecase where this is not an option?

andreyorst commented 4 years ago

I wonder if this change makes the plugin work with editorconfig more nicely though

valpackett commented 4 years ago

I always kept indentwidth and tabstop to be the same size. Do you have a usecase where this is not an option?

It's an option, but I don't get why it's necessary. Yes, most space-indented files don't have tabs at all, but why would I change the visual width of the actual \t when I just want to change what the Tab key does? In neovim, my \t is always 2 chars wide.

work with editorconfig more nicely though

Not sure how exactly this change is related, but I do the following:

https://github.com/myfreeweb/dotfiles/blob/5f48ce6461b712429e4620b25c13018fbb50c261/kakoune/kakrc#L43-L82

andreyorst commented 4 years ago

Not sure how exactly this change is related

https://github.com/mawww/kakoune/issues/3073

andreyorst commented 4 years ago

I think this is a good change. Thanks!