1
Fork 0

Tmux and fish keybind changes/additions

This commit is contained in:
Matei Adriel 2023-02-27 19:47:06 +01:00
parent dce8f5be8e
commit 50668b54d7
No known key found for this signature in database
3 changed files with 23 additions and 9 deletions

View file

@ -16,12 +16,22 @@ set fish_vi_force_cursor
# {{{ Disable greeting # {{{ Disable greeting
set fish_greeting set fish_greeting
# }}} # }}}
# {{{ Use vim-style keybinds # {{{ Keybinds
function fish_user_key_bindings function fish_user_key_bindings
# {{{ Use vim-style keybinds
# Use the vim keybinds # Use the vim keybinds
fish_vi_key_bindings fish_vi_key_bindings
bind -e -M insert -k f10 # unbinds f10 bind -e -M insert -k f10 # unbinds f10
bind -M insert -m default -k f10 'commandline -f repaint' # Exit insert mode with <f10> bind -M insert -m default -k f10 'commandline -f repaint' # Exit insert mode with <f10>
# }}}
# {{{ C-x to clear screen
bind -M default \cx "clear && commandline -f repaint"
bind -M insert \cx "clear && commandline -f repaint"
# }}}
# {{{ C-g to open neogit
bind -M default \cg "nvim +Neogit"
bind -M insert \cg "nvim +Neogit"
# }}}
end end
# }}} # }}}

View file

@ -23,9 +23,8 @@ bind - split-window -v
unbind '"' unbind '"'
unbind % unbind %
# }}} # }}}
# {{{ Zoom with C-z # {{{ Zoom with M-z
unbind C-z bind -n M-z resize-pane -Z
bind -n C-z resize-pane -Z
# }}} # }}}
# {{{ Vim-mode # {{{ Vim-mode
set-window-option -g mode-keys vi set-window-option -g mode-keys vi

View file

@ -1,20 +1,25 @@
{ lib, ... }:
let let
chord = from: to: { inherit from to; }; chord = from: to: { inherit from to; };
unmap = from: chord from [ ]; unmap = from: chord from [ ];
commonChords = [ commonChords = [
# {{{ Modifiers # {{{ Modifiers
(chord [ "s" "d" ] [ "leftshift" ]) (chord [ "s" "d" ] [ "leftshift" ])
(chord [ "k" "l" ] [ "rightshift" ])
(chord [ "s" "f" ] [ "leftctrl" ]) (chord [ "s" "f" ] [ "leftctrl" ])
(chord [ "j" "l" ] [ "rightctrl" ]) (chord [ "s" "a" ] [ "leftalt" ])
(chord [ "l" "k" ] [ "rightshift" ])
(chord [ "l" "j" ] [ "rightctrl" ])
(chord [ "l" "semicolon" ] [ "rightalt" ])
(chord [ "l" "n" ] [ "rightmeta" ])
(chord [ "j" "k" "l" ] [ "rightctrl" "rightshift" ]) (chord [ "j" "k" "l" ] [ "rightctrl" "rightshift" ])
(chord [ "s" "d" "f" ] [ "leftctrl" "leftshift" ]) (chord [ "s" "d" "f" ] [ "leftctrl" "leftshift" ])
(chord [ "n" "l" ] [ "leftmeta" ]) (unmap [ "leftalt" ])
(unmap [ "leftmeta" ])
(unmap [ "leftshift" ]) (unmap [ "leftshift" ])
(unmap [ "rightshift" ])
(unmap [ "leftctrl" ]) (unmap [ "leftctrl" ])
(unmap [ "rightshift" ])
(unmap [ "rightctrl" ]) (unmap [ "rightctrl" ])
(unmap [ "rightalt" ])
(unmap [ "rightmeta" ])
# }}} # }}}
# {{{ Other special keys # {{{ Other special keys
(chord [ "g" "h" ] [ "backspace" ]) (chord [ "g" "h" ] [ "backspace" ])