Skip to content

add bash-like autocomplete mode#78

Open
rpaciorek wants to merge 1 commit intolimbonaut:masterfrom
rpaciorek:bash_like
Open

add bash-like autocomplete mode#78
rpaciorek wants to merge 1 commit intolimbonaut:masterfrom
rpaciorek:bash_like

Conversation

@rpaciorek
Copy link

  • Add autocomplete with list of suggestions mode (default Ctrl+Tab):
    • If the complement is unambiguous, then a single keystroke causes the complement.
    • If the complement is ambiguous, then a single keystroke does nothing; the next keystroke displays a list of suggestions.
  • Use is_action_pressed with exact_match=true for all autocomplete actions
    • This allow the user to remap this mode to Tab and cycle mode to Ctrl+Tab
  • Add print_in_columns function for printing list of suggestions
    • It print single line, but due to RichTextLabel this ensures the correct column arrangement even when changing the window size.
  • Add _add_input_action in plugin.gd to remove code duplication.

* Add autocomplete with list of suggestions mode (default Ctrl+Tab):
   * If the complement is unambiguous, then a single keystroke causes the complement.
   * If the complement is ambiguous, then a single keystroke does nothing; the next keystroke displays a list of suggestions.
* Use `is_action_pressed` with `exact_match=true` for all autocomplete actions
   * This allow the user to remap this mode to Tab and cycle mode to Ctrl+Tab
* Add `print_in_columns` function for printing list of suggestions
   * It print single line, but due to RichTextLabel this ensures the correct column arrangement even when changing the window size.
* Add `_add_input_action` in `plugin.gd` to remove code duplication.
@limbonaut
Copy link
Owner

Sorry for untimely response. This adds something we already do (but differently), so I don't think I can accept it. Alternative implementations like this would make it harder to maintain. Could use some kind of plugin system for such.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants