Home

Awesome

vim-jq

Vim runtime files for jq script files (the command-line JSON processor).

If you are looking for a Vim plugin that runs jq interactively in Vim similar to jqplay.org, see vim-jqplay.

Syntax highlighting

Screenshot

<dl><p align="center"> <img src="https://user-images.githubusercontent.com/6266600/59893960-28064380-93df-11e9-9fa2-bf2933e4d6ea.png" width="480"/> </p></dl>

(Code snippet from: jq-zeros)

Syntax highlighting options

" Don't highlight builtin functions/filters (default: 1)
let g:jq_highlight_builtin_functions = 0

" Don't highlight module prefix, like NAME:: (default: 1)
let g:jq_highlight_module_prefix = 0

" Don't highlight imported JSON file prefix, like $NAME:: (default: 1)
let g:jq_highlight_json_file_prefix = 0

" Highlight objects like .foo (default: 0)
let g:jq_highlight_objects = 1

" Highlight all function calls (default: 0)
" This will highlight all words directly followed by an opening parenthesis
let g:jq_highlight_function_calls = 1

Mappings

Include file searches

Installation

Manual Installation

$ cd ~/.vim/pack/git-plugins/start
$ git clone https://github.com/bfrg/vim-jq

Note: The directory name git-plugins is arbitrary, you can pick any other name. For more details see <kbd>:help packages</kbd>.

Plugin Managers

Assuming vim-plug is your favorite plugin manager, add the following to your vimrc:

Plug 'bfrg/vim-jq'

License

Distributed under the same terms as Vim itself. See <kbd>:help license</kbd>.