From ae38f04a2c4734cb40552d12e262097be7d3ebda Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Sun, 30 Aug 2026 13:23:41 -0400 Subject: [PATCH] zsh: Set EDITOR and VISUAL by presence --- bin/hx | 3 --- etc/profile.linux | 1 + zsh/.zshenv | 3 --- zsh/darwin.zshrc | 3 +++ zsh/linux.zshrc | 3 +++ 5 files changed, 7 insertions(+), 6 deletions(-) delete mode 100755 bin/hx diff --git a/bin/hx b/bin/hx deleted file mode 100755 index a04d6ed..0000000 --- a/bin/hx +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -command helix "$@" diff --git a/etc/profile.linux b/etc/profile.linux index e7df60a..f3fb2d0 100644 --- a/etc/profile.linux +++ b/etc/profile.linux @@ -26,6 +26,7 @@ path_if "$HOME/.local/bin" unset -f source_if unset -f path_if +unset -f has if has gnome-keyring-daemon; then eval "$(gnome-keyring-daemon --start)" diff --git a/zsh/.zshenv b/zsh/.zshenv index 83cf06d..af59a4a 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,8 +1,5 @@ #!/usr/bin/env zsh -export EDITOR='hx' -export VISUAL=$EDITOR - if [[ -a /usr/bin/virtualenvwrapper.sh ]]; then export WORKON_HOME=$HOME/.virtualenvs source /usr/bin/virtualenvwrapper.sh diff --git a/zsh/darwin.zshrc b/zsh/darwin.zshrc index fcbc612..a8c6e4a 100644 --- a/zsh/darwin.zshrc +++ b/zsh/darwin.zshrc @@ -3,6 +3,9 @@ alias ls='ls --color=auto' export LSCOLORS='Exgxbxdxcxegedabagacad' +export EDITOR='hx' +export VISUAL=$EDITOR + alias units='gunits --verbose' alias date='gdate' alias awk='gawk' diff --git a/zsh/linux.zshrc b/zsh/linux.zshrc index 1cafecd..7e6a8b5 100644 --- a/zsh/linux.zshrc +++ b/zsh/linux.zshrc @@ -2,3 +2,6 @@ alias ls='ls --color=auto' export LS_COLORS='no=38;5;244:rs=0:di=38;5;33:ln=38;5;37:mh=00:pi=48;5;230;38;5;136;01:so=48;5;230;38;5;136;01:do=48;5;230;38;5;136;01:bd=48;5;230;38;5;244;01:cd=48;5;230;38;5;244;01:or=48;5;235;38;5;160:su=48;5;160;38;5;230:sg=48;5;136;38;5;230:ca=30;41:tw=48;5;64;38;5;230:ow=48;5;235;38;5;33:st=48;5;33;38;5;230:ex=38;5;64:*.tar=38;5;61:*.tgz=38;5;61:*.arj=38;5;61:*.taz=38;5;61:*.lzh=38;5;61:*.lzma=38;5;61:*.tlz=38;5;61:*.txz=38;5;61:*.zip=38;5;61:*.z=38;5;61:*.Z=38;5;61:*.dz=38;5;61:*.gz=38;5;61:*.lz=38;5;61:*.xz=38;5;61:*.bz2=38;5;61:*.bz=38;5;61:*.tbz=38;5;61:*.tbz2=38;5;61:*.tz=38;5;61:*.deb=38;5;61:*.rpm=38;5;61:*.jar=38;5;61:*.rar=38;5;61:*.ace=38;5;61:*.zoo=38;5;61:*.cpio=38;5;61:*.7z=38;5;61:*.rz=38;5;61:*.apk=38;5;61:*.gem=38;5;61:*.jpg=38;5;136:*.JPG=38;5;136:*.jpeg=38;5;136:*.gif=38;5;136:*.bmp=38;5;136:*.pbm=38;5;136:*.pgm=38;5;136:*.ppm=38;5;136:*.tga=38;5;136:*.xbm=38;5;136:*.xpm=38;5;136:*.tif=38;5;136:*.tiff=38;5;136:*.png=38;5;136:*.svg=38;5;136:*.svgz=38;5;136:*.mng=38;5;136:*.pcx=38;5;136:*.dl=38;5;136:*.xcf=38;5;136:*.xwd=38;5;136:*.yuv=38;5;136:*.cgm=38;5;136:*.emf=38;5;136:*.eps=38;5;136:*.CR2=38;5;136:*.ico=38;5;136:*.tex=38;5;245:*.rdf=38;5;245:*.owl=38;5;245:*.n3=38;5;245:*.ttl=38;5;245:*.nt=38;5;245:*.torrent=38;5;245:*.xml=38;5;245:*Makefile=38;5;245:*Rakefile=38;5;245:*build.xml=38;5;245:*rc=38;5;245:*1=38;5;245:*.nfo=38;5;245:*README=38;5;245:*README.txt=38;5;245:*readme.txt=38;5;245:*.md=38;5;245:*README.markdown=38;5;245:*.ini=38;5;245:*.yml=38;5;245:*.cfg=38;5;245:*.conf=38;5;245:*.c=38;5;245:*.cpp=38;5;245:*.cc=38;5;245:*.log=38;5;240:*.bak=38;5;240:*.aux=38;5;240:*.lof=38;5;240:*.lol=38;5;240:*.lot=38;5;240:*.out=38;5;240:*.toc=38;5;240:*.bbl=38;5;240:*.blg=38;5;240:*~=38;5;240:*#=38;5;240:*.part=38;5;240:*.incomplete=38;5;240:*.swp=38;5;240:*.tmp=38;5;240:*.temp=38;5;240:*.o=38;5;240:*.pyc=38;5;240:*.class=38;5;240:*.cache=38;5;240:*.aac=38;5;166:*.au=38;5;166:*.flac=38;5;166:*.mid=38;5;166:*.midi=38;5;166:*.mka=38;5;166:*.mp3=38;5;166:*.mpc=38;5;166:*.ogg=38;5;166:*.ra=38;5;166:*.wav=38;5;166:*.m4a=38;5;166:*.axa=38;5;166:*.oga=38;5;166:*.spx=38;5;166:*.xspf=38;5;166:*.mov=38;5;166:*.mpg=38;5;166:*.mpeg=38;5;166:*.m2v=38;5;166:*.mkv=38;5;166:*.ogm=38;5;166:*.mp4=38;5;166:*.m4v=38;5;166:*.mp4v=38;5;166:*.vob=38;5;166:*.qt=38;5;166:*.nuv=38;5;166:*.wmv=38;5;166:*.asf=38;5;166:*.rm=38;5;166:*.rmvb=38;5;166:*.flc=38;5;166:*.avi=38;5;166:*.fli=38;5;166:*.flv=38;5;166:*.gl=38;5;166:*.m2ts=38;5;166:*.divx=38;5;166:*.webm=38;5;166:*.axv=38;5;166:*.anx=38;5;166:*.ogv=38;5;166:*.ogx=38;5;166:' + +export EDITOR='helix' +export VISUAL=$EDITOR