mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-03-15 17:16:20 +08:00
made toggle functions available in VISUAL mode
This commit is contained in:
parent
beb7a53839
commit
f37d55ade5
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user