Skip to content

Commit 77ad490

Browse files
author
Dave
authored
DOCSP-19860 add config.set info for VSCode (#171)
* DOCSP-19860 add config.set info for VSCode * Add path note * path to PATH
1 parent 9719c0a commit 77ad490

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/reference/editor-mode.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,20 @@ Using Visual Studio as an External Editor
246246
Visual Studio requires a special parameter to work as an external
247247
editor. Use ``--wait`` with Visual Studio.
248248

249+
Set an environment variable:
250+
249251
.. code-block:: javascript
250252

251253
export EDITOR="/usr/local/bin/code --wait"
252254

255+
You can also set the editor with :ref:`config.set()
256+
<mongosh-shell-settings>`. If Visual Studio is in your ``PATH``, open
257+
:binary:`~bin.mongosh` and run:
258+
259+
.. code-block:: javascript
260+
261+
config.set("editor", "code --wait")
262+
253263
If you use Visual Studio, you can also use the `MongoDB VS Code
254264
Extension <https://www.mongodb.com/products/vs-code>`__.
255265

0 commit comments

Comments
 (0)