powershell-profile icon indicating copy to clipboard operation
powershell-profile copied to clipboard

issue with $Editor

Open BourbonCrow opened this issue 2 years ago • 0 comments

notepad needs to be at bottom else if its in the middle since we all have notepad it will just get stuck there and set $EDITOR to notepad and it wont check the once below (i had that issue with original code when notepad was above sublime text.

# Aliases
#
# If your favorite editor is not here, add an elseif and ensure that the directory it is installed in exists in your $env:Path
#
if (Test-CommandExists nvim) {
    $EDITOR='nvim'
} elseif (Test-CommandExists pvim) {
    $EDITOR='pvim'
} elseif (Test-CommandExists vim) {
    $EDITOR='vim'
} elseif (Test-CommandExists vi) {
    $EDITOR='vi'
} elseif (Test-CommandExists code) {
    $EDITOR='code'
}  elseif (Test-CommandExists notepad++) {
    $EDITOR='notepad++'
} elseif (Test-CommandExists sublime_text) {
    $EDITOR='sublime_text'
} elseif (Test-CommandExists notepad) {
    $EDITOR='notepad'
}

BourbonCrow avatar Dec 06 '23 03:12 BourbonCrow