Tabbing Issues
TomMalbran opened this issue · 7 comments
TomMalbran commented
I found a couple of issue while tabbing through the editable fields in a snippet.
- If I am on the last field and I press tab, I tab outside of the snippet editor. I would expect to go back to the first field. Same if I shift-tab from the first field. It might need another shortcut to exit from the editor.
- If I tab and I left the field empty, I think that it should still display the placeholder.
- If a snippet has multiple fields with the same name, and you already completed it once, maybe tabbing should skip it. Might be debatable.
zaggino commented
- Fixed - you can't
Tab
out of the widget now,Esc
key closes the widget,Enter
key finishes snippet inserting. - Fixed
Tab
will now go to the next empty variable if there's one, or behave normally if all are filled.
Also see https://github.com/zaggino/brackets-snippets#keyboard
zaggino commented
Brackets Snippets (by zaggino) updated to version 0.1.1.
TomMalbran commented
Thanks. It is working better now :)
For 3 that is a good option.
zaggino commented
Cool :) Let me know if you run into any more issues.
TomMalbran commented
I have a couple suggestions, but not sure if you have them planned for later:
- It would be awesome to have an actual editor when showing the snippet. This might be hard to do, but it will make the code easier to read. I guess that when saving the snippets we can give them an extension, so that we know the mode. The editor could be as read only, but with inputs to be able to modify the parameter (not sure how this last part can be done).
- 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.
TomMalbran commented
I can open new issues for those if you want.
zaggino commented
I've done that just now and I'll look into it :) Suggestions are always welcome.