Update vscode section in ~/.zshenv to support insider edition for just the "code" command in its shell
This commit is contained in:
parent
49e1cdd1b0
commit
4f062c3706
1 changed files with 8 additions and 2 deletions
|
@ -11,8 +11,14 @@ done
|
||||||
|
|
||||||
# if we're in vs code's terminal, set the editor to vs code
|
# if we're in vs code's terminal, set the editor to vs code
|
||||||
if [ "${TERM_PROGRAM:-noop}" = "vscode" ]; then
|
if [ "${TERM_PROGRAM:-noop}" = "vscode" ]; then
|
||||||
export EDITOR='code'
|
if [[ "$TERM_PROGRAM_VERSION" =~ -insider$ ]] && command -v code-insiders &> /dev/null; then
|
||||||
export TAG_CMD_FMT_STRING="code --goto {{.Filename}}:{{.LineNumber}}:{{.ColumnNumber}}"
|
export EDITOR='code-insiders'
|
||||||
|
alias code=code-insiders
|
||||||
|
else
|
||||||
|
export EDITOR='code'
|
||||||
|
fi
|
||||||
|
|
||||||
|
export TAG_CMD_FMT_STRING="${EDITOR} --goto {{.Filename}}:{{.LineNumber}}:{{.ColumnNumber}}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export VISUAL="${EDITOR}"
|
export VISUAL="${EDITOR}"
|
||||||
|
|
Loading…
Reference in a new issue