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

One letter snippets do not expand using TAB #5259

Closed
brabalan opened this issue Feb 26, 2016 · 8 comments
Closed

One letter snippets do not expand using TAB #5259

brabalan opened this issue Feb 26, 2016 · 8 comments
Labels
- Bug tracker - Key Bindings stale marked as a stale issue/pr (usually by a bot) Yasnippet

Comments

@brabalan
Copy link
Contributor

Description

I have the auto-completion layer enabled, and one letter snippets do not expand using TAB, they only expand using M-/.

Snippets with two or more characters work correctly, as they are proposed in the company popup and they can then be expanded.

I have reproduced this using latex and emacs-lisp modes.

Reproduction guide

  • Start Emacs
  • Open a latex file
  • type '-' followed by TAB

Observed behaviour:
Nothing happens, or the - gets indented

Expected behaviour:
The snippet bound to - (namely \item) would expand

System Info

  • OS: darwin
  • Emacs: 24.5.1
  • Spacemacs: 0.105.11
  • Spacemacs branch: master (rev. 93e55bb)
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
((auto-completion :variables auto-completion-enable-snippets-in-popup t auto-completion-tab-key-behavior 'complete)
 elfeed emacs-lisp finance git gnus latex ocaml org
 (spell-checking :variables spell-checking-enable-auto-dictionary t))
@nixmaniack
Copy link
Contributor

Check if setting (setq company-minimum-prefix-length 1) helps.

@brabalan
Copy link
Contributor Author

It does not in this particular case because - does not start a company completion.

I guess that I want to decouple yasnippet from company …

@dl3br
Copy link

dl3br commented Feb 26, 2016

For me one letter snippet does not start the completion menu, but the one letter snippet is expanded when I hit TAB.

Actually the variable auto-completion-tab-key-behavior 'complete does not change this behavior.

I looked into the auto-completion documentation, and it says M-/ exand a snippet. So I don't actually know why TAB expands snippets on my setup. Here yas-minor-mode binds TAB to yas-expand. I looked into my config and I haven't set that.

@brabalan
Copy link
Contributor Author

Could you say what F1 k TAB returns for you? Here it's ident-for-tab.

@dl3br
Copy link

dl3br commented Feb 26, 2016

as I said, it is yas-expand on my setup. I haven't set that up. I assume you have yas-minor-mode on.

@brabalan
Copy link
Contributor Author

yas-minor is on, yes. Looking at the code, I see this:

;; disable yas minor mode map
which says that yas minor mode map is disabled and that hippie-expand is used instead. And a few lines above hippie-exp is set up with only the M-/ keybinding.

I'm confused.

@fintelkai
Copy link
Contributor

+1 for this issue.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Bug tracker - Key Bindings stale marked as a stale issue/pr (usually by a bot) Yasnippet
Projects
None yet
Development

No branches or pull requests

5 participants