Vison is a Vim plugin to help writing
*.json file with JSON Schema.
Vison provides the following features:
- Completion keys or values in JSON files
- You can use more than 40 schema files provided by JSON Schema Store.
- Manegement JSON schema files.
How to install
Vison requires the following:
- git command
And, installation of the following Vim plugin is recommended:
If you use NeoBundle for Vim plugins management, append the following to your
NeoBundle 'Shougo/unite.vim' NeoBundle 'Quramy/vison'
After installation, execute
So, vison fetches schema file from JSON Schema Store.
You don't need exec this command at the next Vim launch.
Apply schema with command
To use omni-completion, you can call the
:Vison command on the current buffer.
For example, start editing with
vim package.json (NPM configuration file) and call
If your current buffer's basename is equal to the schema name, you can omit the argument of this command.
Once a schema file is applied, you can complete keys or values in the current buffer with omni-completion(type
You can also configure your
.vimrc for auto applying schema with
autocmd BufRead,BufNewFile package.json Vison autocmd BufRead,BufNewFile .bowerrc Vison bowerrc.json
Apply schema with Unite
If you have installed Unite, you can get a list of stored schema using
And select a candidate, the selected schema apply to the current buffer.
Register schema files
Open some JSON schema file in Vim and exec
Then, the schema file is registered into the vison.
By the default, the schema file is copied into the
This command regards the basename of the current buffer as the schema name.
If the basename is
package.json then the schema name is also
To set schema name explicitly, call this command with the argument.
You can configure completion with the
If you don't want the popup menu:
autocmd FileType json setlocal completeopt-=menu
If you want to show more informations in the preview window when completion:
autocmd FileType json setlocal completeopt+=menu,preview
Customize schema store
If you want more details, please see doc/vison.txt.