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

Binding snippets to words with hotkey completion #13

Open
adamnewtonwright opened this issue Feb 17, 2018 · 1 comment
Open

Binding snippets to words with hotkey completion #13

adamnewtonwright opened this issue Feb 17, 2018 · 1 comment
Labels

Comments

@adamnewtonwright
Copy link

It would be so awesome if, in addition to being able to go to the snippets menu in order to insert snippet, one could simply type, for example,
function
then hit a hot key, say <tab> and have the snippet inserted, like
def function_name(): variables = something return variables

I don't know how feasible this is, but it would be awesome. There is already something like this called ultisnips (https://github.com/SirVer/ultisnips) as a package for Vim.

@moble
Copy link
Owner

moble commented Feb 17, 2018

That's an interesting idea, but I think it's beyond the scope of this plugin — or at the very least, beyond my knowledge of how to implement it. My best guess is that you could maybe use something like the mechanism behind latex/unicode completion, because its basic function is to remove some text that you've typed and replace it with something else.

It's also worth noting that Jupyter is moving in the direction of JupyterLab — in the future, it will replace the notebook as we use it now. One of their aims is supposedly backwards-compatibility, but I just don't see how that's possible for extensions (like this one, and any such tab-completer) that need to get so deep into the details of how these things work. So for now, I don't think it's worth my time trying to hack such a thing together. Of course, pull requests are welcome! :)

@moble moble added the wontfix label Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants