Skip to content

Instantly share code, notes, and snippets.

@gerane
Last active May 23, 2016 15:33
Show Gist options
  • Save gerane/f0eb3f22bd76c2d0d361039349be322c to your computer and use it in GitHub Desktop.
Save gerane/f0eb3f22bd76c2d0d361039349be322c to your computer and use it in GitHub Desktop.
Register-EditorCommand `
-Name "Helpers.EditVSCodeProfile" `
-DisplayName "Edit VS Code Profile" `
-SuppressOutput `
-ScriptBlock {
param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context)
$psEditor.Workspace.OpenFile("$env:USERPROFILE\OneDrive\PowerShell\Profiles\Microsoft.VSCode_profile.ps1")
}
Register-EditorCommand `
-Name "Helpers.EditPSProfile" `
-DisplayName "Edit PowerShell Profile" `
-SuppressOutput `
-ScriptBlock {
param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context)
$psEditor.Workspace.OpenFile("$env:USERPROFILE\OneDrive\PowerShell\Profiles\Microsoft.PowerShell_profile.ps1")
}
Register-EditorCommand `
-Name "Helpers.EditPSISEProfile" `
-DisplayName "Edit PowerShell ISE Profile" `
-SuppressOutput `
-ScriptBlock {
param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context)
$psEditor.Workspace.OpenFile("$env:USERPROFILE\OneDrive\PowerShell\Profiles\Microsoft.PowerShellISE_profile.ps1")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment