You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Variable value: vscode (for example)
To set the EDITOR environment variable in Linux (Manjaro) to use Visual Studio Code (VSCode), you need to: Find the Path to VSCode:
If you installed VSCode from the official Manjaro repository or via Snap/Flatpak, it is usually available as the command code.
You can check its path by running:
bash
which code
Example output: /usr/bin/code
Set the EDITOR Variable Temporarily (for current terminal session):
bash
export EDITOR="code --wait"
- The `--wait` flag is important, as it tells VSCode to wait until you close the file before returning control to the terminal.
- **Set the EDITOR Variable Permanently:**
- Open your shell profile in an editor (e.g. `.bashrc`, `.zshrc`, or `.profile` depending on your shell):
bash
kate ~/.bashrc
or for zsh:
kate ~/.zshrc
Add the following line at the end:
bash
export EDITOR="code --wait"
- Save and exit, then reload your profile:
bash
source ~/.bashrc
or bash
source ~/.zshrc
**Summary:**
- Find VSCode’s path: `which code`
- Add `export EDITOR="code --wait"` to your shell profile
- Reload your profile or restart the terminal
Now, when you use commands that open the default editor (like `git commit` or `crontab -e`), VSCode will be used.
echo $EDITOR
code --wait
Reacted by Sefat Anam, Keshav Chakravarthy and jonloc
Activity
cravenceiling commentedon Jun 26, 2025
Have you set the
EDITORenv variable?Jimit-MTPL commentedon Jun 26, 2025
No i have tried to find the steps to set this but didn't able to find any instruction. It would be great if you guide me to setup this in Windows.
QDaed commentedon Jun 26, 2025
i've the same question how to setup editor on windows
cravenceiling commentedon Jun 26, 2025
Well... I'm not a windows user but this is chatGPT's answer.
✅ Permanently (System/User Level)
Option 1: Using System Settings GUI
Press Win + S, search for “Environment Variables” and open “Edit the system environment variables.”
In the System Properties window, click “Environment Variables…”
Under User variables or System variables, click “New…”
Set:
Variable name: EDITOR
Variable value: vscode (for example)
Click OK → OK → OK to close all windows.
Restart any open terminals or apps to load the new variable.
sl5net commentedon Jul 5, 2025
EDITOR Variable to vscode using Linux (Manjaro)
To set the
EDITORenvironment variable in Linux (Manjaro) to use Visual Studio Code (VSCode), you need to:Find the Path to VSCode:
code.bash
Example output:
/usr/bin/codebash
export EDITOR="code --wait"
kate ~/.bashrc
kate ~/.zshrc
export EDITOR="code --wait"
source ~/.bashrc
source ~/.zshrc
rekram1-node commentedon Oct 21, 2025
closing since this is documented better now
feat: active hours + idle detection gates for session-guardian (anoma…
Merge pull request anomalyco#413 from different-ai/task/ux-improvemen…