You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
5 years ago
|
# Display the current binding mode... if it's vi or vi-like.
|
||
8 years ago
|
#
|
||
5 years ago
|
# To always show the binding mode (regardless of current bindings):
|
||
|
# set -g theme_display_vi yes
|
||
8 years ago
|
#
|
||
5 years ago
|
# To never show:
|
||
8 years ago
|
# set -g theme_display_vi no
|
||
|
|
||
5 years ago
|
function fish_mode_prompt -d 'bobthefish-optimized fish mode indicator'
|
||
|
[ "$theme_display_vi" != 'no' ]
|
||
|
or return
|
||
|
|
||
|
[ "$fish_key_bindings" = 'fish_vi_key_bindings' \
|
||
|
-o "$fish_key_bindings" = 'hybrid_bindings' \
|
||
|
-o "$fish_key_bindings" = 'fish_hybrid_key_bindings' \
|
||
|
-o "$theme_display_vi" = 'yes' ]
|
||
|
or return
|
||
|
|
||
|
__bobthefish_colors $theme_color_scheme
|
||
|
|
||
|
type -q bobthefish_colors
|
||
|
and bobthefish_colors
|
||
|
|
||
|
set_color normal # clear out anything bold or underline...
|
||
|
|
||
|
switch $fish_bind_mode
|
||
|
case default
|
||
|
set_color -b $color_vi_mode_default
|
||
|
echo -n ' N '
|
||
|
case insert
|
||
|
set_color -b $color_vi_mode_insert
|
||
|
echo -n ' I '
|
||
|
case replace_one replace-one
|
||
|
set_color -b $color_vi_mode_insert
|
||
|
echo -n ' R '
|
||
|
case visual
|
||
|
set_color -b $color_vi_mode_visual
|
||
|
echo -n ' V '
|
||
|
end
|
||
|
|
||
|
set_color normal
|
||
6 years ago
|
end
|