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

Keyboard shortcuts + Rewrite #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Keyboard shortcuts + Rewrite #38

wants to merge 4 commits into from

Conversation

zaggino
Copy link
Collaborator

@zaggino zaggino commented Mar 17, 2014

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.

@zaggino zaggino mentioned this pull request Mar 17, 2014
@jrowny
Copy link
Owner

jrowny commented Mar 17, 2014

This is a lot to review, I'll try to get through it this week.

@zaggino
Copy link
Collaborator Author

zaggino commented Mar 17, 2014

I know, I wanted to just implement the shortcut thingy first, but then hit a problem there, hit a problem there and after implementing it the code looked too ugly. So that's the main reason for rewrite. Take as much time as you need.

@zaggino
Copy link
Collaborator Author

zaggino commented Mar 26, 2014

Ping @jrowny :-)

@maxwowpow
Copy link

Ctrl Shift S is bound to save as in Brackets.

@zaggino
Copy link
Collaborator Author

zaggino commented Jul 4, 2014

This is merged in my fork at https://github.com/zaggino/brackets-snippets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants