Skip to content

Instantly share code, notes, and snippets.

@lcarsos
Created December 29, 2014 19:28
Show Gist options
  • Save lcarsos/e0e326e95dcdfadd4a60 to your computer and use it in GitHub Desktop.
Save lcarsos/e0e326e95dcdfadd4a60 to your computer and use it in GitHub Desktop.
# $env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
$VIMPATH = "C:\Program Files (x86)\Vim\vim74\gvim.exe"
Set-Alias vi $VIMPATH
Set-Alias vim $VIMPATH
Set-Alias b Set-PSBreakpoint
# TODO define a function d to handle both these cases
Set-Alias d Remove-PSBreakpoint
Set-Alias da Remove-AllPSBreakpoints
Set-Alias lsb Get-PSBreakpoint
Set-Alias enable Enable-PSBreakpoint
Set-Alias disable Disable-PSBreakpoint
Function Test ($test) {
if ($test) {
Write-Host -ForegroundColor BLACK -BackgroundColor GREEN "True"
} else {
Write-Host -BackgroundColor RED "False"
}
}
Function Remove-AllPSBreakpoints {
Get-PSBreakpoint | % { Remove-PSBreakpoint $_.ID }
}
Function rl ($module) {
Remove-Module $module.TrimStart(".\").TrimEnd(".psm1")
Import-Module $module
}
Function Edit-Profile {
vim $profile
}
Function Edit-Vimrc {
vim $home\_vimrc
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment