vim-json


Ⅰ. 插件描述

JSON helpers for vimscript

Ⅱ. 基本信息

创建日期:  2016-04-14
使用用户:  1
Github星:  8
插件作者:  vimlab

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'mklabs/vim-json-with-ourselves'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'mklabs/vim-json-with-ourselves'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'mklabs/vim-json-with-ourselves'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/mklabs/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

添加新评论