1
0
raylu 2 сар өмнө
parent
commit
80175cfe92
1 өөрчлөгдсөн 7 нэмэгдсэн , 3 устгасан
  1. 7 3
      zshrc

+ 7 - 3
zshrc

@@ -48,7 +48,6 @@ zle -N self-insert url-quote-magic
 
 source $HOME/.zsh_fast_syntax_highlighting/fast-syntax-highlighting.plugin.zsh
 
-export EDITOR=vi
 if builtin which batcat > /dev/null; then
 	export MANPAGER='sh -c "col -bx | batcat --language man --paging always --style plain"'
 	export MANROFFOPT='-c'
@@ -128,6 +127,11 @@ fi
 if [ -d $HOME/bin ]; then
 	PATH=$HOME/bin:$PATH
 fi
+if builtin which nvim > /dev/null; then
+	export EDITOR=nvim
+else
+	export EDITOR=vi
+fi
 
 if builtin which oh-my-posh > /dev/null; then
 	eval "$(oh-my-posh init zsh -c ~/.config/oh-my-posh.toml)"
@@ -232,8 +236,8 @@ if builtin which fzf > /dev/null; then
 				--preview-window '~4,+{2}+4/3,<80(up)' \
 				--query "$*" |
 			cut -d: -f1
-		}
-		fzf-rg-widget() {
+	}
+	fzf-rg-widget() {
 		LBUFFER="${LBUFFER}$(__fzf_rg)"
 		local ret=$?
 		zle reset-prompt