Check for nvim after setting $PATH
dblume

dblume commited on 2024-03-27 23:29:16
Showing 1 changed files, with 8 additions and 7 deletions.

... ...
@@ -114,13 +114,6 @@ alias grep='grep --color=auto'
114 114
 alias fgrep='fgrep --color=auto'
115 115
 alias egrep='egrep --color=auto'
116 116
 alias tmux='tmux -2u'
117
-if command -v nvim &> /dev/null; then
118
-    alias vim='nvim'
119
-    alias vim-='nvim +"setl buftype=nofile" -'
120
-    alias vimdiff='nvim -d'
121
-else
122
-    alias vim-='vim +"setl buftype=nofile" -'
123
-fi
124 117
 
125 118
 # colored GCC warnings and errors
126 119
 export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
... ...
@@ -133,6 +126,14 @@ append_to_path $HOME/bin
133 126
 # .cargo/bin for rustc
134 127
 append_to_path $HOME/.cargo/bin
135 128
 
129
+if command -v nvim &> /dev/null; then
130
+    alias vim='nvim'
131
+    alias vim-='nvim +"setl buftype=nofile" -'
132
+    alias vimdiff='nvim -d'
133
+else
134
+    alias vim-='vim +"setl buftype=nofile" -'
135
+fi
136
+
136 137
 # For interactive shells ('i' in $-), disable stty flow control (ctrl+s,ctrl+q)
137 138
 case "$-" in
138 139
  *i*)
139 140