jugyo / SublimeSnippetMaker

Makes managing snippets easy in Sublime Text
74 stars 15 forks source link

sublime text2 support and fix filename input #3

Closed tsukimizake closed 11 years ago

tsukimizake commented 11 years ago

On Sublime Text2, old code didn't work. So, support sublimeText2 style file.write() function to fix it.

Filename input panel's default value is now just "Default", and add '.sublime-snippet' after reading the input. With this change, it will be easier to edit the filename.

politicus commented 11 years ago

While I didn't know if this plugin was supported by ST2 AND ST3 (on github it is said ST2/ on sublime.wbond.net ST2 AND ST3) I tried it using ST2.

I got an the error "Error parsing snippet xml: Error document empty. In file Packages/User/Lorem.sublime-snippet"

Allready tried to reinstall Package Control.sublime-package, but didn't fix the problem.

politicus commented 11 years ago

Just tried it with ST3. Working like a charm.

tsukimizake commented 11 years ago

To make it work on ST2, just change line 42 of snippetmaker.py to file.write(bytes(snippet_xml))

I sent a pull request, but it's not merged yet.

politicus commented 11 years ago

Just tried it on ST2. Working like a charm. Thank you very much.

jugyo commented 11 years ago

Looks good. Thanks :)