Ⅰ. 插件描述
JSON helpers for vimscriptⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'vimlab/vim-json-impatience-and-laziness'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'vimlab/vim-json-impatience-and-laziness'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'vimlab/vim-json-impatience-and-laziness'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vimlab/vim-json
Ⅳ. 文档说明
# vim-json
JSON parse / stringify
Coming from vim-rhubarb, this plugin provides JSON#parse and JSON#stringify for inclusion in other plugins.
Install
Install this plugin using your favorite plugin manager, or manually by
extracting the files in your ~/.vim or ~/.config/nvim directory.
Plug 'mklabs/vim-json'
API
JSON#parse
let data = JSON#parse(json)
Takes json string and return the equivalent data dictionary.
JSON#stringify
let json = JSON#stringify(dictionary)
Takes dictionary and return the json representation.
License
Distributed under the same terms as Vim itself. See :help license