Keyboard shortcuts + Rewrite #38
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Besides obvious - provide definable keyboard shortcuts for particular snippets, this is also a complete rewrite of the extension files. Code has been split into more files and snippet insertion algorithms have been rewritten.
In old codes line is split into parts and removed from document, then a completely new line(s) is inserted to the place of the old one.
In new codes, line is no longer removed - instead the arguments are collected and only the parts that are actually used for the snippets are later replaced on the same line. As a result of this, you no longer see weird steps when doing Undo (Ctrl+Z) after inserting a snippet.
I hope I haven't introduced any new bugs and we can talk about the new code logic if you'll have time to go through it.
This was originally made from about 30 commits so I squashed it into two because nobody would ever go through them step by step.