-
Notifications
You must be signed in to change notification settings - Fork 19
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
Execute a snippet without using the widget #8
Comments
As an example for the ng-controller snippet i would write It might be hard if the line is not empty. |
If the line is not empty (it contains some other non-whitespace before |
That can work. But if for that line I am thinking that maybe it should use the line up to the cursor. Then you sort the snippets from the one with the most parameters to the one with the least. For each snippet you check if the word that is at the cursor position - the amount of parameter - 1 is the name of a snippet. If there are 2 possible snippets to show, then it shows the editor. |
Released |
Cool. Looking good as a first release. One minor thing is that it looks weird that when a snippet is inserted automatically it opens the inline editor and closes it a second later. |
Updated to |
👍 Just tested it, working nicely so far |
Implemented in version 0.3.0, let me know if there're any issues that should be fixed. |
Hmm version 0.3.0 broke it for me. Before, doing
Would expand into:
But now it expands into:
|
Going to fix that, can you paste your exact snippet you're using here? |
I found another issue trying to test this one. I created a snippet called |
Trigger is
Snippet is:
|
Version 0.3.1 is up, both issues should be now fixed. Let me know how it goes, thanks :) |
Yep, works fine now :D |
Nothing happened when i press Alt - S in editor line with snippet name Ubuntu 14.10, Brackets 1.1, extenstion v 0.4.0 |
Try menu: |
Suggested by @TomMalbran:
It might be cool to write in one line the name of the snippet and then the variables and after pressing Alt-S you get the snippet pasted without going through the inline editor. If there are variables missing, the snippets editor opens on the snippet selected and the cursor placed on the first unfilled parameter.
The text was updated successfully, but these errors were encountered: