Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pine/node-vimlint
:white_check_mark: Validate .vimrc, .vim files with vimlint.
https://github.com/pine/node-vimlint
Last synced: 26 days ago
JSON representation
:white_check_mark: Validate .vimrc, .vim files with vimlint.
- Host: GitHub
- URL: https://github.com/pine/node-vimlint
- Owner: pine
- License: mit
- Created: 2015-03-08T21:52:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-27T19:17:14.000Z (over 5 years ago)
- Last Synced: 2024-04-24T01:02:22.768Z (7 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/vimlint
- Size: 44.9 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node-vimlint
------------[![npm version](https://img.shields.io/npm/v/vimlint.svg?style=flat-square)](http://badge.fury.io/js/vimlint)
[![Build Status](https://img.shields.io/travis/pine/node-vimlint/master.svg?style=flat-square)](https://travis-ci.org/pine/node-vimlint)
[![Code Climate](https://img.shields.io/codeclimate/github/pine/node-vimlint.svg?style=flat-square)](https://codeclimate.com/github/pine/node-vimlint)
[![Coverage Status](https://img.shields.io/coveralls/pine/node-vimlint/master.svg?style=flat-square)](https://coveralls.io/r/pine/node-vimlint?branch=master)
[![Gemnasium](https://img.shields.io/gemnasium/pine/node-vimlint.svg?style=flat-square)](https://gemnasium.com/github.com/pine/node-vimlint)Validate .vimrc, .vim files with [vimlint](https://github.com/syngan/vim-vimlint).
## Getting Started
This library requires `sh` and Vim.
```sh
$ npm install vimlint --save
```If you want to use `vimlint` command on CLI, try to install in global (>= v0.2.0).
```sh
$ npm install -g vimlint
```## References
### vimlint(path, cb)- path: `string` ... Target .vim file path (not `Array`)
- cb: `function` ... Callback function
- err: `object` ... Error object
- stdout: `string` ... Log string of vimlint
- stderr: `string` ... Error string of vimlint```js
var vimlint = require('vimlint')vimlint('testfile.vim', function (err, stdout, stderr) {
if (stdout) { process.stdout.write(stdout); }
if (stderr) { process.stderr.write(stderr); }if (err) {
console.log('ERROR', err);
}else {
console.log('OK');
}
});
```### $ vimlint \
```sh
$ vimlint -hUsage: vimlint
Options:
-h, --help output usage information
-V, --version output the version number$ vimlint foo.vim
```## Additional Notes
This library **doesn't work** on Windows. It works on Linux, Mac OS X, or other *nix OSs.## Plugins
This library can use from Grunt and gulp.- [grunt-vimlint](https://github.com/pine/grunt-vimlint)
- [gulp-vimlint](https://github.com/pine/gulp-vimlint)
- [fly-vimlint](https://github.com/pine/fly-vimlint)## Acknowledgement
This library uses following software to validate `.vim` files. Thank you.- [syngan](https://github.com/syngan) / [vim-vimlint](https://github.com/syngan/vim-vimlint)
- [ynkdir](https://github.com/ynkdir) / [vim-vimlparser](https://github.com/ynkdir/vim-vimlparser)## License
MIT License