config/fish/functions/fish_mode_prompt.fish

25 lines
594 B
Fish
Raw Normal View History

2023-08-28 15:50:06 -07:00
#!/bin/fish
function fish_mode_prompt --description 'Displays the current vi mode'
# Do nothing if not in vi mode
if test "$fish_key_bindings" = "fish_vi_key_bindings"
switch $fish_bind_mode
case default
set_color --bold red
echo -n 🅽
case insert
set_color --bold green
echo -n 🅸
case replace_one
set_color --bold green
echo -n 🆁
case visual
set_color --bold brblue
echo -n 🆅
end
set_color normal
echo -n ' '
end
end