launch $EDITOR in your program
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example use __dirname Jun 13, 2012
LICENSE fix the license Sep 15, 2013
README.markdown pkginit-generated package.json Jun 13, 2012
index.js fix for node 0.10 Jan 30, 2014
package.json 1.0.0 Apr 20, 2015

README.markdown

editor

Launch $EDITOR in your program.

example

var editor = require('editor');
editor('beep.json', function (code, sig) {
    console.log('finished editing with code ' + code);
});

$ node edit.js

editor

finished editing with code 0

methods

var editor = require('editor')

editor(file, opts={}, cb)

Launch the $EDITOR (or opts.editor) for file.

When the editor exits, cb(code, sig) fires.

install

With npm do:

npm install editor

license

MIT