Terminal shortcuts
TERMINAL
I use the Windows Terminal
ctrl+shift+t    new terminal tab
ctrl+shift+w    close terminal tab
ctrl+shift++ open vertical split
ctrl+shift+- open horizontal split
alt+arrow keys move cursor between splits
C-A-up/down scroll up/down
Powershell
requirements
- install setup powershell profile from my dotfiles.
- install fzf and PSFzf wrapper
- ohmyposh command line prompt
- (optional) install oh-my-posh with package manager
- Terminal-Icons
Install-Module -Name Terminal-Icons -Repository PSGallery
and add to $PROFILE:Import-Module -Name Terminal-Icons
- install PSReadLine
- zlocation
PSReadLine
mapping | Description |
---|---|
Ctrl + r | interactive search history |
F2 | toggle history recomendation view |
ctrl+n/p next/prev command history | |
alt+c fzf search subdirectories | |
ctrl+t, fzf search all files in subdirectories |
- remap arrow up and down for interactive search
# uses PSReadLine for better command history navigation. when I press the up arrow it will show me history based on what I've typed so far.
$versionMinimum = [Version] '7.1.999'
if (($host.Name -eq 'ConsoleHost') -and ($PSVersionTable.PSVersion -ge $versionMinimum)) {
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
}
else
{
Set-PSReadLineOption -PredictionSource History
}
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward