Giter Club home page Giter Club logo

vim-jsonc's Introduction

JSON with Comments for Vim

Vim syntax highlighting plugin for JSON with C-style line (//) and block (/* */) comments.

It defines a filetype named jsonc (matching the name used in VS Code, a Microsoft parser library, .mocharc.jsonc, and the jsonc npm package) which can be applied to files using set ft=jsonc or a modeline.

Installation

This plugin can be installed in the usual ways:

git pull https://github.com/kevinoid/vim-jsonc.git ~/.vim/pack/git-plugins/start/vim-jsonc

Using Pathogen

git pull https://github.com/kevinoid/vim-jsonc.git ~/.vim/bundle/vim-jsonc

Using Vundle

Add the following to .vimrc:

Plugin 'kevinoid/vim-jsonc'

Then run :PluginInstall.

Using vim-plug

Add the following to .vimrc between plug#begin() and plug#end():

Plug 'kevinoid/vim-jsonc'

Implementation

This plugin loads the JSON syntax plugin, clears the syntax group for comments as errors, then defines additional syntax to match C-style comments.

This project was inspired by, and the code is based on, elzr/vim-json#61 by @TheLocehiliosan.

Contributing

Contributions are appreciated! Please add tests where possible and ensure ./run-tests.sh passes.

If the desired change is large, complex, backwards-incompatible, can have significantly differing implementations, or may not be in scope for this project, opening an issue before writing the code can avoid frustration and save a lot of time and effort.

License

This package is available under the terms of the MIT License.

vim-jsonc's People

Contributors

kevinoid avatar imsnif avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.