diff --git a/tools/fish/conf.d/keymap.fish b/tools/fish/conf.d/keymap.fish index 958ec7d..4e79ff5 100644 --- a/tools/fish/conf.d/keymap.fish +++ b/tools/fish/conf.d/keymap.fish @@ -13,29 +13,7 @@ fish_vi_key_bindings -# Colemak hnei -# ^ -# e -# < h i > -# n -# v -# bind -M default 'h' backward-char -bind -M default n down-or-search -bind -M default e up-or-search -bind -M default i forward-char - -# Similar position to [i] in QWERTY -bind -M default -m insert l repaint-mode -bind -M default -m insert L beginning-of-line repaint-mode - -# Ne{[k]s}t -> fish doesnt have this feature - -# [J]ump -bind -M default j forward-word -bind -M default J forward-bigword - -# Use N to Join -bind -M default N end-of-line delete-char +source $DOTFILES/tools/fish/conf.d/keymap/+colemak.fish # Emacs Hybrid bind -M default ctrl-p up-or-search diff --git a/tools/fish/conf.d/keymap/+colemak.fish b/tools/fish/conf.d/keymap/+colemak.fish new file mode 100644 index 0000000..77595dd --- /dev/null +++ b/tools/fish/conf.d/keymap/+colemak.fish @@ -0,0 +1,23 @@ +# Colemak hnei +# ^ +# e +# < h i > +# n +# v +# bind -M default 'h' backward-char +bind -M default n down-or-search +bind -M default e up-or-search +bind -M default i forward-char + +# Similar position to [i] in QWERTY +bind -M default -m insert l repaint-mode +bind -M default -m insert L beginning-of-line repaint-mode + +# Ne{[k]s}t -> fish doesnt have this feature + +# [J]ump +bind -M default j forward-word +bind -M default J forward-bigword + +# Use N to Join +bind -M default N end-of-line delete-char \ No newline at end of file diff --git a/tools/powershell/Keymap.ps1 b/tools/powershell/Keymap.ps1 index 938f4d5..5e67b1f 100644 --- a/tools/powershell/Keymap.ps1 +++ b/tools/powershell/Keymap.ps1 @@ -9,21 +9,6 @@ Set-PSReadLineOption -PredictionViewStyle InlineView Set-PSReadLineOption -PredictionSource HistoryAndPlugin # Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead # PSReadLineKeyHandlers -## Colemak hnei -Set-PSReadLineKeyHandler -Chord "n" -Function NextHistory -ViMode Command -Set-PSReadLineKeyHandler -Chord "e" -Function PreviousHistory -ViMode Command -Set-PSReadLineKeyHandler -Chord "i" -Function ViForwardChar -ViMode Command -## Similar position to [i] in QWERTY -Set-PSReadLineKeyHandler -Chord "l" -Function ViInsertMode -ViMode Command -Set-PSReadlineKeyHandler -Chord "L" -Function ViInsertAtBegining -ViMode Command -## Ne{[k]s}t -Set-PSReadLineKeyHandler -Chord "k" -Function RepeatSearch -ViMode Command -Set-PSReadLineKeyHandler -Chord "K" -Function RepeatSearchBackward -ViMode Command -## [j]ump -Set-PSReadLineKeyHandler -Chord "j" -Function NextWordEnd -ViMode Command -Set-PSReadLineKeyHandler -Chord "J" -Function ViEndOfGlob -ViMode Command -## Use N to Join -Set-PSReadLineKeyHandler -Chord "N" -Function ViJoinLines -ViMode Command Set-PSReadLineKeyHandler -Chord "Control+Oem4" -Function ViCommandMode -ViMode Insert # ^[ to Escape Set-PSReadLineKeyHandler -Chord "Ctrl+a" -Function BeginningOfLine Set-PSReadLineKeyHandler -Chord "Ctrl+e" -Function EndOfLine @@ -38,5 +23,9 @@ Set-PSReadLineKeyHandler -Chord "Alt+Backspace" -Function BackwardKillLine Set-PSReadLineKeyHandler -Chord "Ctrl+Delete" -Function KillWord Set-PSReadLineKeyHandler -Chord "Ctrl+Shift+Delete" -Function KillLine Set-PSReadLineKeyHandler -Chord "Alt+Delete" -Function KillLine +Set-PSReadLineKeyHandler -Chord "Ctrl+c" -Function CopyOrCancelLine -ViMode Insert +Set-PSReadLineKeyHandler -Chord "Ctrl+c" -Function CopyOrCancelLine -ViMode Command ## Use to Invoke MenuComplete Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete + +. $(Join-Path $DOTFILES "tools" "powershell" "Keymap" "Colemak.ps1") \ No newline at end of file diff --git a/tools/powershell/Keymap/Colemak.ps1 b/tools/powershell/Keymap/Colemak.ps1 new file mode 100644 index 0000000..71d8acc --- /dev/null +++ b/tools/powershell/Keymap/Colemak.ps1 @@ -0,0 +1,15 @@ +## Colemak hnei +Set-PSReadLineKeyHandler -Chord "n" -Function NextHistory -ViMode Command +Set-PSReadLineKeyHandler -Chord "e" -Function PreviousHistory -ViMode Command +Set-PSReadLineKeyHandler -Chord "i" -Function ViForwardChar -ViMode Command +## Similar position to [i] in QWERTY +Set-PSReadLineKeyHandler -Chord "l" -Function ViInsertMode -ViMode Command +Set-PSReadlineKeyHandler -Chord "L" -Function ViInsertAtBegining -ViMode Command +## Ne{[k]s}t +Set-PSReadLineKeyHandler -Chord "k" -Function RepeatSearch -ViMode Command +Set-PSReadLineKeyHandler -Chord "K" -Function RepeatSearchBackward -ViMode Command +## [j]ump +Set-PSReadLineKeyHandler -Chord "j" -Function NextWordEnd -ViMode Command +Set-PSReadLineKeyHandler -Chord "J" -Function ViEndOfGlob -ViMode Command +## Use N to Join +Set-PSReadLineKeyHandler -Chord "N" -Function ViJoinLines -ViMode Command \ No newline at end of file