Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency with inserting highlighted word #203

Open
jsdalton opened this issue Apr 10, 2019 · 1 comment
Open

Inconsistency with inserting highlighted word #203

jsdalton opened this issue Apr 10, 2019 · 1 comment

Comments

@jsdalton
Copy link

jsdalton commented Apr 10, 2019

I've used this plugin for a long time and I have the following problem (which I do not see addressed in the documentation).

Put simply, I am in insert mode, I hit <Tab> to bring up a dropdown of matches, then I cycle through the options. Now...

How do I choose the option to insert?

Here is what I have found:

  • If I have to actually cycle through to a suggestion, then pressing <Enter> works as I would expect it to. The new suggestion is inserted into the document and I can continue typing (in Insert mode).
  • If the suggestion I want is the "initial" suggestion, then <Enter> does not work. Or rather it works but ... it inserts a carriage return. I have tried other keys and they all essentially "work" (i.e. result in the suggestion being inserted) but also the character itself that I type gets inserted.
    • One way of choosing that does work is the right arrow key. It chooses the suggestion and doesn't actually insert anything into the document. However.... the right arrow key does not actually choose the suggestion if I use anything other than the initial suggestion.

In short, I'd like to know the "right" way to:

  • Choose one of the matching suggestions, whether it is the initial suggestion or one a I cycle to
  • Insert that selection into my document (i.e. complete the phrase)
  • Put my cursor at the end fo the insertion in insert mode so that I can continue typing.

Thanks to anyone who can help me figure this out.

@ervandew
Copy link
Owner

Do you have supertab's <cr> mapping enabled? (`let g:SuperTabCrMapping = 1')

With that enabled I can't reproduce the behavior you've described, so if you do have that mapping enabled, my guess would be that some other plugin is also mapped to <cr>, causing the issue. You can check in vim using: :verbose imap <cr>

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

No branches or pull requests

2 participants