Awesome
json-mode.el
Major mode for editing JSON files.
Extends the builtin js-mode to add better syntax highlighting for JSON and some nice editing keybindings.
Install
M-x package-install json-mode
You need to have the MELPA repository or MELPA Stable repository enabled in emacs for this to work.
Default Keybindings
C-c C-f
: format the region/buffer withjson-pretty-print
(https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/json.el)C-c C-p
: display a path to the object at point withjson-snatcher
(https://github.com/Sterlingg/json-snatcher)C-c P
: copy a path to the object at point to the kill ring withjson-snatcher
(https://github.com/Sterlingg/json-snatcher)C-c C-t
: Toggle betweentrue
andfalse
at pointC-c C-k
: Replace the sexp at point withnull
C-c C-i
: Increment the number at pointC-c C-d
: Decrement the number at point
Indent Width
Customize js-indent-level
.
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.