made toggle functions available in VISUAL mode

This commit is contained in:
Joseph Tannhuber 2014-08-03 22:38:46 +02:00
parent beb7a53839
commit f37d55ade5
2 changed files with 4 additions and 2 deletions

View File

@ -19,7 +19,7 @@ Translation of zsh's prezto [budspencer theme][budspencer]
- Last command's duration time
- Git status
* style can be toggled in NORMAL mode with `,,` between
* style can be toggled in NORMAL and in VISUAL mode with `,,` between
- `symbols` (shows git status symbols, see below)
- `counts` (shows amount of files that are affected)
* symbols:
@ -33,7 +33,7 @@ Translation of zsh's prezto [budspencer theme][budspencer]
- ●: there are untracked files
- ✭: there are stashed commits
- Present working directory
* style can be toggled in NORMAL mode with space bar
* style can be toggled in NORMAL and in VISUAL mode with space bar
* styles implemented:
- `short` (show truncated path)
- `long` (show full path)

View File

@ -35,6 +35,7 @@ function fish_git_toggle_cm --description "Toggles style of git segment, press ,
commandline -f repaint
end
bind -M default ',,' fish_git_toggle_cm
bind -M visual ',,' fish_git_toggle_cm
if set -q -x $PWDSTYLE
set -x PWDSTYLE short long none
@ -50,6 +51,7 @@ function fish_pwd_toggle_cm --description "Toggles style of pwd segment, press s
end
end
bind -M default ' ' fish_pwd_toggle_cm
bind -M visual ' ' fish_pwd_toggle_cm
function fish_cmd_duration_cm -d "Displays the elapsed time of last command"
if test (count $CMD_DURATION) -gt 0