From 795cfa58ceef09e4cca7aa3e8b0f19ab09770fc1 Mon Sep 17 00:00:00 2001 From: Emma Humphries Date: Sun, 17 Jun 2018 02:17:44 -0700 Subject: [PATCH] Add instructions for VS Code --- docs/recipes.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/recipes.rst b/docs/recipes.rst index 85c6b4a6..5b813a4a 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -140,3 +140,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 `_.