mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
chore(keymaps): Standalone keymaps for Colemak hnei
This commit is contained in:
parent
17cf51c1ca
commit
418ae4cc63
4 changed files with 43 additions and 38 deletions
|
|
@ -13,29 +13,7 @@
|
||||||
|
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
|
|
||||||
# Colemak hnei
|
source $DOTFILES/tools/fish/conf.d/keymap/+colemak.fish
|
||||||
# ^
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Emacs Hybrid
|
# Emacs Hybrid
|
||||||
bind -M default ctrl-p up-or-search
|
bind -M default ctrl-p up-or-search
|
||||||
|
|
|
||||||
23
tools/fish/conf.d/keymap/+colemak.fish
Normal file
23
tools/fish/conf.d/keymap/+colemak.fish
Normal file
|
|
@ -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
|
||||||
|
|
@ -9,21 +9,6 @@ Set-PSReadLineOption -PredictionViewStyle InlineView
|
||||||
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
|
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
|
||||||
# Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead
|
# Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead
|
||||||
# PSReadLineKeyHandlers
|
# 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 "Control+Oem4" -Function ViCommandMode -ViMode Insert # ^[ to Escape
|
||||||
Set-PSReadLineKeyHandler -Chord "Ctrl+a" -Function BeginningOfLine
|
Set-PSReadLineKeyHandler -Chord "Ctrl+a" -Function BeginningOfLine
|
||||||
Set-PSReadLineKeyHandler -Chord "Ctrl+e" -Function EndOfLine
|
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+Delete" -Function KillWord
|
||||||
Set-PSReadLineKeyHandler -Chord "Ctrl+Shift+Delete" -Function KillLine
|
Set-PSReadLineKeyHandler -Chord "Ctrl+Shift+Delete" -Function KillLine
|
||||||
Set-PSReadLineKeyHandler -Chord "Alt+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 <Tab> to Invoke MenuComplete
|
## Use <Tab> to Invoke MenuComplete
|
||||||
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
|
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
|
||||||
|
|
||||||
|
. $(Join-Path $DOTFILES "tools" "powershell" "Keymap" "Colemak.ps1")
|
||||||
15
tools/powershell/Keymap/Colemak.ps1
Normal file
15
tools/powershell/Keymap/Colemak.ps1
Normal file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue