spacemacs/layers/+lang/json
Miciah Dashiel Butler Masters 78297be625 Fix various typos
* Fix various isolated typos

"apppend" -> "append"

"availabe" -> "available"

"Descripti using ternon" -> "Description"

"you have not them" -> "you don't have them"

"new on" -> "new one"

"plained" -> "curved"

"repel" -> "REPL"

"vairable" -> "variable"

* Fix a few errors in the CoffeeScript layer readme

Add a missing "the".

Correct a reference to the layer as "javascript" to "coffeescript".

Fix the syntax on the link to CoffeeLint.

* Fix typos: "dofile" -> "dotfile"

* Fix typos: "formated" and "formating"

"formated" -> "formatted"

"formating" -> "formatting"

* hy: Fix docstrings in funcs.el

Fix copy-and-pasted docstring text for
spacemacs/hy-shell-eval-current-form-and-go and
spacemacs/hy-shell-eval-region-and-go.

* Fix typos: "indendation" -> "indentation"

* Fix typos: "the the", "a a"

Fix duplicated (or misplaced) articles.

* Fix typos: "wether" -> "whether"

* Fix typos: "intialize" -> "initialize"
2018-05-23 22:12:30 -04:00
..
img Create new json layer extracted from javascript layer 2018-05-14 00:49:13 -04:00
funcs.el Fix various typos 2018-05-23 22:12:30 -04:00
layers.el New layer web-beautify extracted from javascript layer 2018-05-18 01:25:29 -04:00
packages.el web-beautify: rename spacemacs-web-beautify--modes 2018-05-20 00:41:17 -04:00
README.org Fix various typos 2018-05-23 22:12:30 -04:00

JSON layer

/TakeV/spacemacs/media/commit/f12b849993e58d0c83841812f255d9da183fd3e2/layers/+lang/json/img/json.png

Description

This layer adds support for JSON files with json-mode

Features:

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add json to the existing dotspacemacs-configuration-layers list in this file.

Configuration

To define the default indentation set the variable js-indent-level.

web-beautify

See web-beautify layer documentation.

Usage

Reformat

SPC m = will reformat the whole buffer or the active region. Use numerical prefix argument to specify a different indentation than js-indent-level. Use the universal prefix argument to print decoded strings, for instance:

{"name":"foo\"bar","nick":"foo \u00e4 bar","description":"<pre>\nbaz\n</pre>","home":"/home/foobar"}

Will be reformatted:

{
  "name": "foo\"bar",
  "nick": "foo ä bar",
  "description": "<pre>
  baz
  </pre>",
  "home": "/home/foobar"
}

Display navigable hierarchy

SPC m h h displays the hierarchy for the whole JSON document or the active region. Use the universal prefix argument SPC u SPC m h h to create the hierarchy for the JSON after the point.

Key Bindings

Key Binding Description
SPC m = DWIM Reformat JSON
SPC m h p Get the path of the value at point
SPC m h h DWIM navigate JSON hierarchy
SPC m h H Navigate JSON hierarchy of the whole buffer

JSON hierarchy

Key Binding Description
RET Expand/Collapse node
TAB Select next node
S-TAB Select previous node