Socket
Socket
Sign inDemoInstall

open-editor

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open-editor - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

20

index.js

@@ -29,3 +29,3 @@ 'use strict';

if (editor.id === 'webstorm') {
if (['webstorm', 'intellij'].indexOf(editor.id) !== -1) {
args.push(lineColumnPath.stringify(parsed, {column: false}));

@@ -43,2 +43,7 @@ continue;

if (['vim', 'neovim'].indexOf(editor.id) !== -1) {
args.push(`+call cursor(${parsed.line}, ${parsed.column})`, parsed.file);
continue;
}
args.push(parsed.file);

@@ -49,3 +54,4 @@ }

bin: editor.bin,
args
args,
isTerminalEditor: editor.isTerminalEditor
};

@@ -57,5 +63,7 @@ };

const stdio = result.isTerminalEditor ? 'inherit' : 'ignore';
const cp = childProcess.spawn(result.bin, result.args, {
detached: true,
stdio: 'ignore'
stdio
});

@@ -72,5 +80,9 @@

cp.unref();
if (result.isTerminalEditor) {
cp.on('exit', process.exit);
} else {
cp.unref();
}
};
module.exports.make = make;

9

package.json
{
"name": "open-editor",
"version": "1.0.1",
"version": "1.1.0",
"description": "Open files in your editor at a specific line and column",

@@ -39,6 +39,9 @@ "license": "MIT",

"webstorm",
"textmate"
"textmate",
"vim",
"neovim",
"intellij"
],
"dependencies": {
"env-editor": "^0.1.0",
"env-editor": "^0.3.1",
"line-column-path": "^1.0.0",

@@ -45,0 +48,0 @@ "opn": "^5.0.0"

@@ -12,2 +12,5 @@ # open-editor [![Build Status](https://travis-ci.org/sindresorhus/open-editor.svg?branch=master)](https://travis-ci.org/sindresorhus/open-editor)

- TextMate*
- Vim
- NeoVim
- IntelliJ IDEA*

@@ -67,5 +70,5 @@ *\*Doesn't support column.*

Same as `openEditor()`, but returns an object with the binary name and arguments.
Same as `openEditor()`, but returns an object with the binary name, arguments, and a flag indicating whether the editor runs in the terminal.
Example: `{bin: 'subl', args: ['foo.js:1:5']}`
Example: `{bin: 'subl', args: ['foo.js:1:5'], isTerminalEditor: false}`

@@ -72,0 +75,0 @@ Can be useful if you want to handle opening the files yourself.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc