Skip to content

Instantly share code, notes, and snippets.

@brettz9
Last active September 27, 2019 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brettz9/b5863cc36539b0f9ce87975b5faad0b1 to your computer and use it in GitHub Desktop.
Save brettz9/b5863cc36539b0f9ce87975b5faad0b1 to your computer and use it in GitHub Desktop.
Set up and use Atom as npm editor for `npm edit` command

Use -a flag to add project without opening new window:

npm config set editor 'atom -a'

Use npm edit . to open the current project (just a lightly better habit than calling atom -a directly in case changing editor).

Also allows adding, e.g., npm edit depOfCurrentPackage into Atom.

And it sets it as the editor for npm config edit (to open the npm config file in Atom).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment