Open raphaelgoetter opened 11 years ago
(I see it's an old post, but I wanted to reply so everybody who read this'll know)
You can change that keybind to whatever you want in "jrowny.brackets.snippets/main.js"
//add the keybinding
KeyBindingManager.addBinding(SNIPPET_EXECUTE, "Ctrl-Alt-V");
But I agree with you that it should be good if it could work as Emmet, because now if you change keybind "Ctrl-Alt-V" to "Tab" with this extension and then you want to use regular space with "Tab" it deletes everything on that line. Issue here: https://github.com/jrowny/brackets-snippets/issues/30
This is now solved and you can set your own key in settings dialog - https://github.com/jrowny/brackets-snippets/pull/34 Error with deleting everything on the line is solved in https://github.com/jrowny/brackets-snippets/pull/35
Hello,
I changed my settings to "Tab" key, but doesn't work if Emmet extension is installed :/
emmet uses tab
for something else ... you can't have multiple bindings on one key currently
https://github.com/emmetio/brackets-emmet/blob/master/keymap.json
Yep, that's the problem.
I'd love to expand my snippets as I use Emmet, with Tab
key :/
What exactly does the emmet extension do on tab key?
It expands abbreviations, it's his main function.
Ex. div>p
+ tab
-->
<div>
<p></p>
</div>
Well one expands abbreviations, one snippets - it'd be quite hard to execute both at the same time, wasn't it?
We do not execute both at the same time.
Emmet is made to extend the most common abbreviations: HTML elements, CSS properties, vendor prefixes, or many shortcuts such as w20
→ width: 20px;
etc..
On the other hand, snippets of code does not seem at all incompatible.
For example, one of my snippets is navi
→
<nav role="navigation" id="navigation">
<ul>
<li> <a href="#"> </ a> </ li>
<li> <a href="#"> </ a> </ li>
<li> <a href="#"> </ a> </ li>
<li> <a href="#"> </ a> </ li>
<li> <a href="#"> </ a> </ li>
</ ul>
</ nav>
Why would it be uncompatible?
@raphaelgoetter I'll try to open an issue with main Brackets core when I'll have time. Currently implementing this feature you want is not possible.
Hi raphaelgoetter, You asked:
Why would it be uncompatible?
It would be incompatible because Emmet creates "code" with all strings. Even the ones it does not know. If you type "navi" and hit the tab key, you will get: <navi></navi>
How would brackets know what was really the plugin you were expecting to execute the command (Emmet or Snippets)?
I don't think it is possible to use both with the same key combination.
Hello,
"Ctrl-Alt-V" to insert the snippet is a bit painful and long. Would it be possible to expand trigger with tab key, as Emmet does for example ?