Fixing issue #21 moving loading of configuration to async callback function plugin_loaded

This commit is contained in:
Nikolajus 2013-04-23 12:49:30 +02:00 committed by Nikolajus Krauklis
parent 4282802b65
commit a101fa0f12
2 changed files with 14 additions and 2 deletions

View File

@ -41,3 +41,8 @@ class PrettyjsonCommand(sublime_plugin.TextCommand):
import sys
exc = sys.exc_info()[1]
sublime.status_message(str(exc))
def plugin_loaded():
global s
s = sublime.load_settings("Pretty JSON.sublime-settings")

View File

@ -1,5 +1,12 @@
import simplejson as json
from simplejson import OrderedDict
try:
# python 3 / Sublime Text 3
from . import simplejson as json
from .simplejson import OrderedDict
except (ValueError):
# python 2 / Sublime Text 2
import simplejson as json
from simplejson import OrderedDict
import decimal
import unittest