wrappers/fish: enable vi mode
This commit is contained in:
parent
890c6e7dec
commit
fffd77b3d1
3 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
||||||
status --is-interactive
|
status --is-interactive
|
||||||
and begin
|
and begin
|
||||||
|
fish_vi_key_bindings insert
|
||||||
|
|
||||||
# Abbreviations
|
# Abbreviations
|
||||||
## nix
|
## nix
|
||||||
|
@ -19,7 +20,7 @@ and begin
|
||||||
alias cat bat
|
alias cat bat
|
||||||
alias l 'eza -lah --group-directories-first --icons'
|
alias l 'eza -lah --group-directories-first --icons'
|
||||||
|
|
||||||
|
# Integrations
|
||||||
zoxide init fish | source
|
zoxide init fish | source
|
||||||
direnv hook fish | source
|
direnv hook fish | source
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
config-fish = pkgs.writeText "config.fish" ''
|
config-fish = pkgs.writeText "config.fish" ''
|
||||||
${path-add-lines}
|
${path-add-lines}
|
||||||
|
|
||||||
source ${./config.fish}
|
|
||||||
source ${./prompt.fish}
|
source ${./prompt.fish}
|
||||||
|
source ${./config.fish}
|
||||||
'';
|
'';
|
||||||
in [
|
in [
|
||||||
"-C"
|
"-C"
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
# name: Nim
|
# name: Nim
|
||||||
# author: Guilhem "Nim" Saurel − https://github.com/nim65s/dotfiles/
|
# author: Guilhem "Nim" Saurel − https://github.com/nim65s/dotfiles/
|
||||||
|
|
||||||
|
# Vi-mode
|
||||||
|
# The default mode prompt would be prefixed, which ruins our alignment.
|
||||||
|
function fish_mode_prompt; end
|
||||||
|
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
set -l retc red
|
set -l retc red
|
||||||
test $status = 0; and set retc green
|
test $status = 0; and set retc green
|
||||||
|
@ -60,11 +64,6 @@ function fish_prompt
|
||||||
# Date
|
# Date
|
||||||
_nim_prompt_wrapper $retc '' (date +%X)
|
_nim_prompt_wrapper $retc '' (date +%X)
|
||||||
|
|
||||||
# Vi-mode
|
|
||||||
# The default mode prompt would be prefixed, which ruins our alignment.
|
|
||||||
function fish_mode_prompt
|
|
||||||
end
|
|
||||||
|
|
||||||
if test "$fish_key_bindings" = fish_vi_key_bindings
|
if test "$fish_key_bindings" = fish_vi_key_bindings
|
||||||
or test "$fish_key_bindings" = fish_hybrid_key_bindings
|
or test "$fish_key_bindings" = fish_hybrid_key_bindings
|
||||||
set -l mode
|
set -l mode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue