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
set fish_greeting
# }}}
# {{{ Use vim-style keybinds
# {{{ Keybinds
function fish_user_key_bindings
# {{{ Use vim-style keybinds
# Use the vim keybinds
fish_vi_key_bindings
bind -e -M insert -k f10 # unbinds 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
# }}}

View file

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

View file

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