Indent with tabs by default (when no specific indentation settings apply) #3095
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This tiny code change adjusts the default indentation behavior when no language-specific or user-defined setting applies.
Wait, don't run away... We're not having the tabs vs. spaces discussion!
Keep in mind we're talking about the behavior when Helix is opened for regular text files or with an empty scratch buffer:
At that moment, as a user, I expect the editor to act like a simple, "dumb editor".
At that moment I don't expect Helix to replace tabs with spaces because Helix thinks I could be programming in a language where spaces could be more important.
A simple, dumb editor, inserts a tab when I press [Tab], and a space when I press [Space].
There's many examples of default behavior in simple editors; KWrite, Notepad, Writer on Mac, ... but also Vim and Emacs (when they're not applying language-specific settings). They all insert a tab by default.
Therefore, for the sake of consistency with existing "expected" behavior, and because Helix is not an IDE at that moment, I suggest to change its default behavior.