From 240fb883cc06ef7408dd8511fb85a4c0e104108e Mon Sep 17 00:00:00 2001 From: Emma Humphries Date: Tue, 26 Jun 2018 11:28:23 -0700 Subject: [PATCH] Add instructions for VS Code (#544) --- docs/recipes.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/recipes.rst b/docs/recipes.rst index e1aef9a9..bb5d0770 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -123,3 +123,30 @@ To set `Notepad++ `_ as your editor, edit the jrn "editor": "C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession", The double backslashes are needed so jrnl can read the file path correctly. The ``-multiInst -nosession`` options will cause jrnl to open its own Notepad++ window. + +Visual Studio Code +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To set `Visual Studo Code `_ as your editor on Linux, edit ``.jrnl_config`` like this: + +.. code-block:: javascript + + "editor": "/usr/bin/code --wait", + +The --wait argument tells VS Code to wait for files to be written out before handing back control to jrnl. + +On MacOS you will need to add VS Code to your PATH. You can do that by adding: + +.. code-block:: bash + + export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" + +to your .bash_profile, or by running the **Install 'code' command in PATH** command from the command pallet in VS Code. + +Then you can add: + +.. code-block:: javascript + + "editor": "code --wait", + +to ``.jrnl_config``. See also `the Visual Studio Code documentation `_.