Update README
This commit is contained in:
parent
f36ac3dde3
commit
b7af550526
|
@ -37,7 +37,7 @@ def check_jq():
|
|||
jq_path = shutil.which(jq_test)
|
||||
jq_exists = True
|
||||
except OSError as ex:
|
||||
print(str(ex))
|
||||
sublime.message_dialog(f'[Error]: {ex}')
|
||||
jq_exists = False
|
||||
|
||||
|
||||
|
@ -240,8 +240,8 @@ class PrettyJsonCommand(PrettyJsonBaseCommand, sublime_plugin.TextCommand):
|
|||
if region is None:
|
||||
continue
|
||||
|
||||
try:
|
||||
selection_text = self.view.substr(region)
|
||||
try:
|
||||
obj = self.json_loads(selection_text)
|
||||
|
||||
json_text = self.json_dumps(obj=obj, minified=False)
|
||||
|
|
|
@ -13,7 +13,6 @@ class PrettyJsonLintListener(sublime_plugin.EventListener, PrettyJsonBaseCommand
|
|||
|
||||
as_json = s.get("as_json", ["JSON"])
|
||||
if any(syntax in view.settings().get("syntax") for syntax in as_json):
|
||||
self.view = view
|
||||
self.clear_phantoms()
|
||||
json_content = view.substr(sublime.Region(0, view.size()))
|
||||
try:
|
||||
|
|
22
README.md
22
README.md
|
@ -2,11 +2,20 @@
|
|||
|
||||
Prettify/Minify/Query/Goto/Validate/Lint JSON plugin for Sublime Text 3 & 4
|
||||
|
||||
## Updates
|
||||
|
||||
All keybindings have been removed in favor of the Command Palette. And to allow
|
||||
for users to configure their own specific key bindings.
|
||||
|
||||
This also prevents key binding overrides which conflict with other packages. For
|
||||
good documentation on key bindings I recommend you review the [Offical Docs][] or
|
||||
[Community Docs][]
|
||||
|
||||
## Installation
|
||||
|
||||
### Package Control (Recommended)
|
||||
|
||||
Install this sublime text 3/4 package via [Package Control][]
|
||||
Install this sublime text 3 / 4 package via [Package Control][]
|
||||
search for package: "[**Pretty JSON**][]"
|
||||
|
||||
### Manual Installation
|
||||
|
@ -29,13 +38,7 @@ No longer supported
|
|||
## Usage
|
||||
|
||||
To prettify JSON, make selection of json
|
||||
(or else it will try to use full view buffer) and press keys:
|
||||
|
||||
- Linux: <kbd>ctrl+alt+j</kbd>
|
||||
- Windows: <kbd>ctrl+alt+j</kbd>
|
||||
- OS X: <kbd>cmd+ctrl+j</kbd>
|
||||
|
||||
or through Command Palette <kbd>Ctrl+Shift+P</kbd>
|
||||
(or else it will try to use full view buffer) and through Command Palette <kbd>Ctrl+Shift+P</kbd>
|
||||
find "Pretty JSON: Format JSON"
|
||||
(you can search for part of it like 'pretty format')
|
||||
|
||||
|
@ -192,3 +195,6 @@ If you YAMLing then maybe you interested in this plugin: [PrettyYAML][]
|
|||
[**Pretty JSON**]: https://packagecontrol.io/packages/Pretty%20JSON
|
||||
[PrettyYAML]: https://github.com/aukaost/SublimePrettyYAML
|
||||
[./jq]: http://stedolan.github.io/jq/
|
||||
[Offical Docs]: https://www.sublimetext.com/docs/key_bindings.html
|
||||
[Community Docs]: https://docs.sublimetext.io/guide/customization/key_bindings.html
|
||||
|
||||
|
|
Loading…
Reference in New Issue