Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chemzqm/jscheck
Javascript syntax check plugin for vim
https://github.com/chemzqm/jscheck
Last synced: about 1 month ago
JSON representation
Javascript syntax check plugin for vim
- Host: GitHub
- URL: https://github.com/chemzqm/jscheck
- Owner: chemzqm
- Created: 2015-12-15T07:56:30.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-24T16:28:05.000Z (almost 9 years ago)
- Last Synced: 2024-10-29T12:40:03.270Z (about 2 months ago)
- Language: VimL
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Javascript syntax check for vim
A vim plugin for checking javascript syntax error only.
It's build for speed, almost 6x faster than [eslint](https://github.com/eslint/eslint) on my machine.
[![faster](http://7b1fyu.com1.z0.glb.clouddn.com/time.png?imageView2/0/w/600)](http://7b1fyu.com1.z0.glb.clouddn.com/time.png)
It uses notifies functions from [syntastic](https://github.com/scrooloose/syntastic), the result looks like:
[![looks](http://7b1fyu.com1.z0.glb.clouddn.com/jscheck.png?imageView2/0/w/600)](http://7b1fyu.com1.z0.glb.clouddn.com/jscheck.png)
Hope it help to improve your experience with coding javascript.
## Install
You should have [node](http://nodejs.org/) installed, it comes with `npm` command.
Add the plugin to your vim plugin management config, for example with [Vundle](https://github.com/gmarik/vundle)
in your .vimrc:
" If you want to have notifies, [syntastic](https://github.com/scrooloose/syntastic) is needed
Plugin 'scrooloose/syntastic'
Plugin 'chemzqm/jscheck'then install:
:so ~/.vimrc
:BundleInstallYou have to disable auto check of syntastic for syntastic to avoid syntastic check on file save:
let g:syntastic_mode_map = {
\ "mode": "active",
\ "passive_filetypes": ["javascript"] }The plugin will prompt you to install the node dependencies only if they are not installed.
## Usage
``` VimL
" Check current file content by command, no need to save
:JSCheck" disable auto check for javascript files on save
let g:jscheck_no_autocheck = 1
```## Q&A
Q: Why only one error shown each time?
A: [acorn](https://github.com/ternjs/acorn) was made to throw when it enconter an error in order to have best speed.
Q: How to disable auto jump?
A: I've no idea how the jump happens, but it seems good.
Q: Support asynchronous check?
A: I will have a try.
## license
MIT
Copyright © 2015 [email protected]
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.