Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Add new editor.tabType scoped setting #3719

Closed
@benogle

Description

While digging into scoping editor.softTabs in #3718, it's pretty clear that the setting has very little influence on the actual value chosen. It's effectively the worst-case fallback: it only works on an empty file.

I propose doing a couple things:

  • adding a new editor.tabType setting that accepts 3 values: Auto, Hard, Soft. With the default being auto. Then in the scoped settings for each language, they can set it to whatever they want.
  • Changing TextEditor::setSoftTabs to being a settings override accepting 4 values: unset / use-the-settings, Auto, Hard, Soft
  • Reading the settings on each time we need to get the tab type. Something like (pseudo code):
getTabType: (scopeDescriptor) ->
  @userTabTypeOverride or atom.config.get(scopeDescriptor, 'editor.tabType') or atom.config.get(scopeDescriptor, 'editor.softTabs') or 'soft'

See

@softTabs = @usesSoftTabs() ? @softTabs ? atom.config.get('editor.softTabs') ? true
and
buildIndentString: (number, column=0) ->
for reference.

Refs

Comment if you know of more issues, complaints. I know there have been several complaints about this, but cant find issues.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions