diff --git a/.config/Code/User/settings.json b/.config/Code/User/settings.json index a9d8837..263dda2 100644 --- a/.config/Code/User/settings.json +++ b/.config/Code/User/settings.json @@ -62,6 +62,6 @@ "editor.wordBasedSuggestions": false, }, "terminal.integrated.env.linux": { - "INTEG_EMU": "vscode" + "EMULATOR": "code" } } \ No newline at end of file diff --git a/.gitconfig b/.gitconfig index ae008d7..3038424 100644 --- a/.gitconfig +++ b/.gitconfig @@ -11,7 +11,7 @@ signingkey = 1D0FA4387C5873294D5863980F9FE41723A8A297 [core] - editor = nvim + editor = $EDITOR [alias] st = status -sb diff --git a/.zshrc b/.zshrc index e77f669..1511805 100644 --- a/.zshrc +++ b/.zshrc @@ -42,7 +42,7 @@ alias pacs="pacman -Slq | fzf --multi --preview 'pacman -Si {1}' | xargs -ro sud alias apacs="paru -Slq | fzf --multi --preview 'paru -Si {1}' | xargs -ro paru -S" # Config/scripts Edit -alias ce="echo \"\$(/bin/ls \$HOME/.scripts/bin | sed \"s|^|\$(realpath \$HOME/.scripts/bin/ --relative-to=.)/|\")\n\$((cd \$HOME && config ls-tree -r master --name-only \$HOME) | sed \"s|^|\$(realpath \$HOME --relative-to=.)/|\" | sed 's|^\./||')\" | fzf --info=inline --prompt='Select a file: ' --preview='bat --paging=never --style=plain --color=always {}' | xargs -r \$EDITOR" +alias ce="echo \"\$(/bin/ls \$HOME/.scripts/bin | sed \"s|^|\$(realpath \$HOME/.scripts/bin/ --relative-to=.)/|\")\n\$((cd \$HOME && config ls-tree -r master --name-only \$HOME) | sed \"s|^|\$(realpath \$HOME --relative-to=.)/|\" | sed 's|^\./||')\" | fzf --info=inline --prompt='Select a file: ' --preview='bat --paging=never --style=plain --color=always {}' | xargs -r \$(echo \$EDITOR)" bindkey -s '^[^E' 'ce\n' # Alias for python3 @@ -79,6 +79,8 @@ source $HOME/.fast-nvm.sh source $HOME/.nvm/bash_completion # Check if is integrated terminal emulator -if [ -z "$INTEG_EMU" ]; then - colorscript random; +if [ "$EMULATOR" = "code" ]; then + export EDITOR="code --wait" +else + colorscript random fi