mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-03-27 18:25:12 +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
|
- Last command's duration time
|
||||||
- Git status
|
- 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)
|
- `symbols` (shows git status symbols, see below)
|
||||||
- `counts` (shows amount of files that are affected)
|
- `counts` (shows amount of files that are affected)
|
||||||
* symbols:
|
* symbols:
|
||||||
@ -33,7 +33,7 @@ Translation of zsh's prezto [budspencer theme][budspencer]
|
|||||||
- ●: there are untracked files
|
- ●: there are untracked files
|
||||||
- ✭: there are stashed commits
|
- ✭: there are stashed commits
|
||||||
- Present working directory
|
- 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:
|
* styles implemented:
|
||||||
- `short` (show truncated path)
|
- `short` (show truncated path)
|
||||||
- `long` (show full path)
|
- `long` (show full path)
|
||||||
|
@ -35,6 +35,7 @@ function fish_git_toggle_cm --description "Toggles style of git segment, press ,
|
|||||||
commandline -f repaint
|
commandline -f repaint
|
||||||
end
|
end
|
||||||
bind -M default ',,' fish_git_toggle_cm
|
bind -M default ',,' fish_git_toggle_cm
|
||||||
|
bind -M visual ',,' fish_git_toggle_cm
|
||||||
|
|
||||||
if set -q -x $PWDSTYLE
|
if set -q -x $PWDSTYLE
|
||||||
set -x PWDSTYLE short long none
|
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
|
||||||
end
|
end
|
||||||
bind -M default ' ' fish_pwd_toggle_cm
|
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"
|
function fish_cmd_duration_cm -d "Displays the elapsed time of last command"
|
||||||
if test (count $CMD_DURATION) -gt 0
|
if test (count $CMD_DURATION) -gt 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user