daaain / Handlebars

Fullest Handlebars.js templating support for Sublime Text 2 / 3. Also drives syntax colouring on Github and in Visual Studio Code. Install from: https://packagecontrol.io/packages/Handlebars.
MIT License
301 stars 48 forks source link

Fixed tabstops on if/else blocks #93

Closed iamntz closed 7 years ago

daaain commented 7 years ago

Thanks for the PR @iamntz!

I'm not sure if I get the changes though, can you please explain?

iamntz commented 7 years ago

Sure thing, here is a short video:

http://img.iamntz.com/jing/video_2017-01-22__52_13.mp4

Before reset, you see that the first tabstop is not allowing adding a condition (current situation). After reset, the first tabstop will be just after the if, so you can easily add a conditional (my PR).

daaain commented 7 years ago

Sorry for super slow reply speed, had a look at the video, it makes sense!

I'm happy to merge, just one nitpick / detail, any reason why you used 5 instead of 2 as the tab stop after 1?

iamntz commented 7 years ago

Ah, that's easy: it's an old habit that makes snippets future proof. I.e. if you'd want to add another tabstop between existing tabsopts - something like {{#if ${1} ${2}}} - it would require changing every other tabstop. Having a gap between them will allow you to just enter one without much worry.

In this case it may be overkill. Want me to change it?

daaain commented 7 years ago

Ah I see! I think maybe in this case please change it as all the other snippets are sequential. Sorry about the nitpicking!