Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Make code hint insertion on tab key configurable #5084

Merged
merged 2 commits into from
Sep 6, 2013

Conversation

iwehrman
Copy link
Contributor

@iwehrman iwehrman commented Sep 5, 2013

Addresses #4963 by making the behavior of the CodeHintList on tab key events configurable on a global and per-CodeHintProvider basis. The CodeHintManager provider registration API is generalized with an additional optional property, insertHintOnTab, that indicates whether the CodeHintManager should request that the provider of the current session insert the currently selected hint on tab key events, or if instead a tab character should be inserted into the editor. If a provider omits this property, the behavior is determined by the CodeHintManager. The default behavior is to insert a tab character into the editor, as is the case now. The default can be changed globally with the new CodeHintManager.setInsertHintOnTab(bool) method. For an example use of this method, see my awesome new extension: iwehrman/brackets-insert-hint-on-tab.

This was @peterflynn's idea!

…mine whether or not the currently selected hint should be inserted on tab key events
* setInsertHintOnTab(true) indicates that the currently selected code hint
* should be inserted on tab key events. setInsertHintOnTab(false) indicates
* that a tab character should be inserted into the editor on tab key events.
* The default behavior can be can be overridden by individual providers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate "can be" on this line.

@ghost ghost assigned RaymondLim Sep 6, 2013
@RaymondLim
Copy link
Contributor

Done initial review. just 2 minor nits.

@iwehrman
Copy link
Contributor Author

iwehrman commented Sep 6, 2013

I fixed both of these issues, so this is ready for re-review. Thanks for the quick turnaround!

@RaymondLim
Copy link
Contributor

@iwehrman Seems like you haven't pushed your commit yet.

@iwehrman
Copy link
Contributor Author

iwehrman commented Sep 6, 2013

Whoops again. Sorry about that. Commits are pushed now.

@RaymondLim
Copy link
Contributor

Looks good... Merging.

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.

None yet

2 participants