-
Notifications
You must be signed in to change notification settings - Fork 103
Expansion of nested snippets #192
base: master
Are you sure you want to change the base?
Conversation
shift-tab on first tab-stop should destroy the expansion, and if possible move to the previous tab-stop of a surrounding expansion
@@ -655,6 +651,43 @@ describe "Snippets extension", -> | |||
expect(editor.lineTextForBufferRow(7)).toBe " }one t1 three" | |||
expect(editor.lineTextForBufferRow(12)).toBe "};one t1 three" | |||
|
|||
describe "when there are nested snippets", -> | |||
it "tries to expand before moving to the next tabstop", -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails. The keybindings are resolved in the wrong order, but only in tests, it works in real life. This is the reason that the next test fails too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused about the current intended behaviour when a snippet is triggered within an existing expansion. According to the specs, it should go to the next tabstop without expanding, but according to the keymaps (snippets-1.cson and snippets-2.cson), it should try to expand first. When I try it myself, it expands most of the times, but not always.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense to attempt to expand first if possible.
Works with multiple cursors and multi-snippets now.
At last! When will this branch be merged? |
Any plans to move forward with this? |
Hi, are there any plans to implement these changes? Happy to revive this effort if the behavior in question is desired. |
Fixes #152.