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

Support editor.tabType - #8356

Merged
benogle merged 12 commits into
masterfrom
bo-tab-type
Aug 13, 2015
Merged

benogle merged 12 commits into
masterfrom
bo-tab-type

Conversation

@benogle

@benogle benogle commented Aug 13, 2015

Copy link
Copy Markdown
Contributor

This does the simplest thing possible. When editor.tabType is set to auto, it does what it did before. When it is set to hard or soft, it uses those values all the time unless setSoftTabs() is explicitly called. The API is unchanged. Specs have been consolidated a bit as there were a couple places where the tab stuff was being tested.

Eventually (another PR), I'd like to change the name of editor.softTabs setting to editor.defaultTabType or something more clear.

Closes #8186 @Abdillah, I've used a couple of your commits.
Closes #3719

Comment thread src/text-editor.coffee

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not super pretty. As I need to either add it to @disposables then remove on a grammar change, or explicitly destroy it in the destroyed method. I chose the latter

@maxbrunsfeld

Copy link
Copy Markdown
Contributor

Do you think we should deprecate editor.softTabs?

@benogle

benogle commented Aug 13, 2015

Copy link
Copy Markdown
Contributor Author

One caveat with this is: if the user has explicitly set the soft tabs value to something and an event happens (config or grammar change), the user's setting is ignored and computed based on the rules of the setting. I thought it added extra complexity to support tracking the explicitly set choice, and I wasnt sure if it would be the correct behavior anyway.

@benogle

benogle commented Aug 13, 2015

Copy link
Copy Markdown
Contributor Author

Do you think we should deprecate editor.softTabs?

We could change the name to editor.defaultTabType or something? Or yeah, we could deprecate it.

@benogle benogle mentioned this pull request Aug 13, 2015
@benogle

benogle commented Aug 13, 2015

Copy link
Copy Markdown
Contributor Author

Anyone opposed to merging this?

@maxbrunsfeld

Copy link
Copy Markdown
Contributor

🚢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants