Skip to content

Instantly share code, notes, and snippets.

@kriipke
Created September 25, 2023 04:31
Show Gist options
  • Save kriipke/97dc27da18c52edd85caaedf06460619 to your computer and use it in GitHub Desktop.
Save kriipke/97dc27da18c52edd85caaedf06460619 to your computer and use it in GitHub Desktop.
Powershell $PROFILE: PSReadline config to mimic unix readline behavior
Set-PSReadlineKeyHandler -Chord Ctrl+a -Function BeginningOfLine
Set-PSReadlineKeyHandler -Chord Ctrl+e -Function EndOfLine
Set-PSReadlineKeyHandler -Chord Ctrl+w -Function BackwardDeleteWord
Set-PSReadlineKeyHandler -Chord Ctrl+u -Function BackwardKillLine
Set-PSReadlineKeyHandler -Chord Ctrl+y -Function Yank
Set-PSReadlineKeyHandler -Chord Alt+f -Function ForwardWord
Set-PSReadlineKeyHandler -Chord Alt+b -Function BackwardWord
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
Set-PSReadlineKeyHandler -Chord UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Chord DownArrow -Function HistorySearchForward
Set-PSReadlineKeyHandler -Key Ctrl+d -Function ViExit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment