Compare commits
2 Commits
0a9f004dc9
...
56367b82f5
Author | SHA1 | Date | |
---|---|---|---|
56367b82f5 | |||
08b543f7fc |
15
profile.ps1
15
profile.ps1
@ -1,7 +1,9 @@
|
|||||||
# Use Cmder's multiline prompt and posh-git.
|
# Use Cmder's multiline prompt and posh-git.
|
||||||
Import-Module "$env:ChocolateyToolsLocation\\Cmder\\vendor\\profile.ps1"
|
Import-Module "$env:ChocolateyToolsLocation\Cmder\vendor\profile.ps1"
|
||||||
# Enable Chocolatey completions.
|
# Enable Chocolatey completions.
|
||||||
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||||
|
# Enable op completions.
|
||||||
|
Import-Module "$env:LOCALAPPDATA\1Password\cli\opProfile.psm1"
|
||||||
|
|
||||||
# Set UTF-8 as the character set for pipes and output objects.
|
# Set UTF-8 as the character set for pipes and output objects.
|
||||||
# https://gist.github.com/xoner/4671514
|
# https://gist.github.com/xoner/4671514
|
||||||
@ -12,16 +14,15 @@ $OutputEncoding = New-Object -typename System.Text.UTF8Encoding
|
|||||||
Set-PSReadLineOption -BellStyle None -EditMode Vi
|
Set-PSReadLineOption -BellStyle None -EditMode Vi
|
||||||
# Make C-w backward delete a word.
|
# Make C-w backward delete a word.
|
||||||
Set-PSReadLineKeyHandler -Chord Ctrl+w -Function BackwardDeleteWord
|
Set-PSReadLineKeyHandler -Chord Ctrl+w -Function BackwardDeleteWord
|
||||||
# TODO: Doesn't work with PSReadLine 2.1
|
# Make C-[ escape insert mode.
|
||||||
# Hoping this gets fixed at some point and will just start working.
|
# https://github.com/PowerShell/PSReadLine/issues/906#issuecomment-916847040
|
||||||
# Set-PSReadLineKeyHandler -Chord Ctrl+[ -Function ViCommandMode
|
|
||||||
# Workaournd from https://github.com/PowerShell/PSReadLine/issues/906#issuecomment-916847040
|
|
||||||
Set-PSReadLineKeyHandler -Chord 'Ctrl+Oem4' -Function ViCommandMode
|
Set-PSReadLineKeyHandler -Chord 'Ctrl+Oem4' -Function ViCommandMode
|
||||||
|
# Enable menu style tab completions. https://stackoverflow.com/a/37715242
|
||||||
|
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
|
||||||
|
|
||||||
# Change cursor shape based on what Vi mode the line editor is in.
|
# Change cursor shape based on what Vi mode the line editor is in.
|
||||||
# Testing and works with PowerShell 5.1
|
# Tested and works with PowerShell 5.1
|
||||||
# NOTE: Requires: Install-Module PsReadline -Scope CurrentUser -Force
|
# NOTE: Requires: Install-Module PsReadline -Scope CurrentUser -Force
|
||||||
# FIXME: Doesn't work with PSReadLine 2.0
|
|
||||||
function OnViModeChange {
|
function OnViModeChange {
|
||||||
if ($args[0] -eq 'Command') {
|
if ($args[0] -eq 'Command') {
|
||||||
# Set the cursor to non-blinking block.
|
# Set the cursor to non-blinking block.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user