Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config option to change what editor is used by @inquirer/editor #11

Open
1 task
gfargo opened this issue Jul 9, 2023 · 1 comment
Open
1 task

Config option to change what editor is used by @inquirer/editor #11

gfargo opened this issue Jul 9, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@gfargo
Copy link
Owner

gfargo commented Jul 9, 2023

From the docs, when using the editor prompt from @InQuirer package:

Launches an instance of the users preferred editor on a temporary file. Once the user exits their editor, the content of the temporary file is read as the answer. The editor used is determined by reading the $VISUAL or $EDITOR environment variables. If neither of those are present, the OS default is used (notepad on Windows, vim on Mac or Linux.)

This is complete when:

  • There is a config option to control the default editor to open

... could also take a look at using the postfix option inside of our editor calls:

postfix string no (default to .txt) The postfix of the file being edited. Adding this will add color highlighting to the file content in most editors.

Resources:

@gfargo gfargo added the enhancement New feature or request label Jul 9, 2023
@gfargo
Copy link
Owner Author

gfargo commented Jul 11, 2023

Currently, it appears there's an issue when trying to use code as the editor.

Mentioned the behavior in SBoudrias/Inquirer.js#1155. Will continue to investigate a solution or workaround for being able to edit contents within code instead of a terminal editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant