feat: add vim function

This commit is contained in:
2026-03-18 17:34:47 +08:00
parent 96c923d6cc
commit df359c6e07
+11 -1
View File
@@ -113,7 +113,7 @@ function dc
set use_sudo false
set args $argv
if test (count $argv) -gt 0; and test "$argv[1]" = "is_sudo"
if test (count $argv) -gt 0; and test "$argv[1]" = is_sudo
set use_sudo true
set args $argv[2..-1]
end
@@ -206,3 +206,13 @@ if command -v mise >/dev/null
add_to_path $HOME/.local/share/mise/shims
mise activate fish | source
end
function vim
if command -q nvim
command nvim $argv
else if command -q vim
command vim $argv
else
command vi $argv
end
end