Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Can't change autocomplete-plus:select-next in keymap #261

Closed

Description

@23tux

Hi,

I'm trying to overwrite some behaviour in my keymap.cson. But when I add this code, it has no effect:

'atom-text-editor:not(mini) .autocomplete-plus.autocomplete-suggestion-list':
  'tab': 'autocomplete-plus:select-next'
  'enter': 'autocomplete-plus:confirm'
  'up': 'unset!'
  'down': 'unset!'

I want to navigate through the suggestion list via tab and confirm them via enter. Can someone explain, why this isn't working? The example is from the readme.

Activity

  1. joefitzgerald commented on Feb 11, 2015

    @joefitzgerald
    Contributor

    @park9140 could the change you made last night change the selector that needs to be used for keybindings? If so, we need a 🔤 docs update.

  2. park9140 commented on Feb 11, 2015

    @park9140
    Contributor

    @joefitzgerald, not anymore. The fix @benogle put in to remove the hidden input and allow IME input mode to work did however.

    @23tux, you need to switch to using atom-text-editor.autocomplete-active as your selector.

  3. 23tux commented on Feb 11, 2015

    @23tux
    Author

    @park9140 When I change it to atom-text-editor.autocomplete-active then every enter triggers an autocomplete, not only when the suggestion window is active. Where do I look to see what selector it is?

  4. joefitzgerald commented on Feb 11, 2015

    @joefitzgerald
    Contributor

    I've observed this also.

  5. joefitzgerald commented on Feb 11, 2015

    @joefitzgerald
    Contributor

    @park9140 it appears that with the move away from the hidden input, we've broken the ability to use keymaps to redefine the bindings. This is why we backed away from it last time, also.

    When this behavior exhibits itself, confirm seems to always get called on the last-confirmed item. I think we need to clear our the selected item so that this doesn't happen.

  6. joefitzgerald commented on Feb 11, 2015

    @joefitzgerald
    Contributor

    I found an easy way to prevent multiple-confirmation - but I'm not aware of how I allow enter to continue to service the editor once the suggestion list isn't active...

  7. joefitzgerald commented on Feb 11, 2015

    @joefitzgerald
    Contributor

    We're not removing autocomplete-active when the suggestion list is hidden:

    <atom-text-editor class="editor autocomplete-active" tabindex="-1" callattachhooks="true" data-grammar="source gfm" data-encoding="utf8"><div class="underlayer"><div is="wrap-guide" class="wrap-guide" style="left: 800px; display: block;"></div></div><div class="overlayer"></div></atom-text-editor>

  8. joefitzgerald commented on Feb 11, 2015

    @joefitzgerald
    Contributor

    Yep, that fixed it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions