Skip to content

Instantly share code, notes, and snippets.

@floam
Created July 7, 2016 01:38
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save floam/e89ed4a882eb629b0a70040f876479c6 to your computer and use it in GitHub Desktop.
Save floam/e89ed4a882eb629b0a70040f876479c6 to your computer and use it in GitHub Desktop.
function fish_mode_prompt --description 'Displays the current 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 🅽
case insert
set_color --bold green
echo 🅸
case replace-one
set_color --bold green
echo 🆁
case visual
set_color --bold brmagenta
echo 🆅
end
set_color normal
printf " "
end
end
@pruett
Copy link

pruett commented Feb 20, 2018

thanks, this worked great!

minor edit: s/replace-one/replace_one

@ashleydavies
Copy link

Thanks for this!

@Arelav
Copy link

Arelav commented Aug 8, 2018

Thanks. Works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment