Skip to content

Instantly share code, notes, and snippets.

@opensiriusfox
Last active June 10, 2023 23:18
Show Gist options
  • Save opensiriusfox/2ebefc009d8f33541d7dd1cf4e36840c to your computer and use it in GitHub Desktop.
Save opensiriusfox/2ebefc009d8f33541d7dd1cf4e36840c to your computer and use it in GitHub Desktop.
Git-Bash Notepad++ shortcut
# When notepad++ is available, use it
function npp() {
export IFS=$'\n'
NOTEPADPP_EXE='/c/Program Files/Notepad++/notepad++.exe'
if [[ -e "${NOTEPADPP_EXE}" ]]; then
echo 'notepad++.exe '$*' &'
"${NOTEPADPP_EXE}" $* &
return 0
else
echo "notepad++ not found."
return 1
fi
}
alias _wrapping_fix='kill -WINCH $$'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment