1

I want to spawn an editor in the middle of a program written in Node.js, let the user edit files in the directory opened in the editor, and return control to the program once the new editor instance is closed.

I would imagine I can do this with child_process.spawnSync.

Are there any example packages I can look at on npm which do this?

justin
  • 3,357
  • 1
  • 23
  • 28

1 Answers1

1

Take a look at another StackOverflow answer: on opening a EDITOR from Node.js and dealing with the TTY.

(Also consider using GIT_EDITOR end variable in addition to just EDITOR :)

Community
  • 1
  • 1
RyanWilcox
  • 13,890
  • 1
  • 36
  • 60