
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
open-editor2
Advanced tools
This is a fork of open-editor Add support for cjs+esm Add support for Cursor, Trae, Windsurf
Open files in your editor at a specific line and column
Supports any editor, but only the following editors will open at a specific line and column:
*Doesn't support column.
npm install open-editor
ESM:
import openEditor from 'open-editor';
openEditor(['unicorn.js:5:3']);
CommonJS:
const openEditor = require('open-editor');
openEditor(['unicorn.js:5:3']);
Open the given files in the user's editor at specific line and column if supported by the editor. It does not wait for the editor to start or quit unless you specify wait: true in the options.
Type: string[]
Items should be in the format foo.js:1:5.
Type: object
interface Options {
/**
The editor to use.
*/
readonly editor?: string;
/**
Wait for the editor to close.
@default false
*/
readonly wait?: boolean;
}
Same as openEditor(), but returns an object with the binary name, arguments, and a flag indicating whether the editor runs in the terminal.
Example: {binary: 'subl', arguments: ['foo.js:1:5'], isTerminalEditor: false}
Can be useful if you want to handle opening the files yourself.
import {getEditorInfo} from 'open-editor';
getEditorInfo([
{
file: 'foo.js',
line: 1,
column: 5,
}
]);
//=> {binary: 'subl', arguments: ['foo.js:1:5'], isTerminalEditor: false}
FAQs
Open files in your editor at a specific line and column
We found that open-editor2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.