HttpRepl icon indicating copy to clipboard operation
HttpRepl copied to clipboard

Add set editor command

Open tlmii opened this issue 5 years ago • 0 comments

The most common preferences being set, by far, are editor.command.default (the path to the editor used for specifying a request body) and editor.command.default.arguments (the arguments to pass to the editor).

I propose we create a new command set editor which takes a required parameter of the path and an option of the arguments. The command could be implemented to simply set the existing preferences, but would make the syntax for doing so easier to remember and more discoverable.

Compare the existing way of setting VS Code as the editor:

pref set editor.command.default "/usr/bin/code"
pref set editor.command.default.arguments "--wait"

with how it could be done with the new command:

set editor "/usr/bin/code" --args "--wait"

Not having to remember the entire preference name (even if you take suggestions into account, there are dozens of preference names in the list before you get to the right one) should help lots of users, and only needing one command for our common case (VS Code, which normally requires the --wait arg) should simplify things as well.

tlmii avatar Dec 29 '20 08:12 tlmii