mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
60 lines
1.9 KiB
PowerShell
60 lines
1.9 KiB
PowerShell
### VARIABLES ###
|
|
$EDITOR = "code"
|
|
|
|
### Navigator ###
|
|
|
|
# Relative navigation #
|
|
# ${function:~} = { Set-Location -Path ~ } cd is better
|
|
${function:...} = { Set-Location -Path ..\.. }
|
|
${function:....} = { Set-Location -Path ..\..\.. }
|
|
${function:.....} = { Set-Location -Path ..\..\..\.. }
|
|
${function:......} = { Set-Location -Path ..\..\..\..\.. }
|
|
|
|
# Absolute navigation
|
|
${function:docs} = { Set-Location -Path ~/Documents }
|
|
${function:down} = { Set-Location -Path ~/Downloads }
|
|
${function:dt} = { Set-Location -Path ~/Desktop }
|
|
${function:mytmp} = { Set-Location -Path ~/Temp }
|
|
${function:one} = { Set-Location -Path ~/OneDrive }
|
|
${function:doku} = { Set-Location -Path ~/doku && Get-ChildItem }
|
|
|
|
### Alias ###
|
|
|
|
# Shell Equivalents #
|
|
Set-Alias "touch" "New-Item"
|
|
${function:ll} = { Get-ChildItem -Force }
|
|
|
|
# Shell Configurations #
|
|
${function:shcfg} = { code $PROFILE }
|
|
Set-Alias "pwshcfg" "shcfg"
|
|
${function:reload} = { . $PROFILE }
|
|
${function:pulldots} = { Set-Location -Path $DOTFILES && git pull }
|
|
|
|
# Editors #
|
|
Set-Alias "v" "nvim"
|
|
Set-Alias "c" "code"
|
|
Set-Alias "gvi" "neovide"
|
|
|
|
# File Creation #
|
|
function mkcd { param ( [string] $dirname) mkdir $dirname && Set-Location $dirname }
|
|
function tc { param ( [string] $filename) New-Item $filename && code $filename }
|
|
function tv { param ( [string] $filename) New-Item $filename && nvim $filename }
|
|
function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem }
|
|
|
|
### Dev ###
|
|
|
|
# .NET #
|
|
${function:csi} = { dotnet repl --default-kernel csharp}
|
|
${function:fsi} = { dotnet repl --default-kernel fsharp}
|
|
|
|
# Python & Conda #
|
|
Set-Alias "py" "python"
|
|
Set-Alias "ipy" "ipython"
|
|
${function:pyact} = { conda activate $args[0] }
|
|
${function:pydact} = { conda deactivate }
|
|
${function:pylsenvs} = { conda env list }
|
|
${function:pymkenv} = { conda create --name $args[0] }
|
|
${function:pyrmenv} = { conda remove --name $args[0] --all }
|
|
|
|
|
|
# C & C++ #
|