Skip to content

Instantly share code, notes, and snippets.

@trgino
Created March 30, 2022 08:04
Show Gist options
  • Save trgino/53bc2077fa350422484f210bdf1e87e2 to your computer and use it in GitHub Desktop.
Save trgino/53bc2077fa350422484f210bdf1e87e2 to your computer and use it in GitHub Desktop.
nppexec php check
set php_dir = "php.exe"
npp_console disable
NPE_CONSOLE v+
npp_console enable
cmd.exe /c "$(PHP_DIR) -l "$(FULL_CURRENT_PATH)""
npp_console disable
set linepos ~ strrfind "$(OUTPUT1)" "on line "
if $(linepos) == -1 goto Done
set linepos ~ $(linepos) + 8
set s ~ substr $(linepos) - $(OUTPUT1)
set s ~ $(s) - 1
SCI_SENDMSG SCI_GOTOLINE $(s)
unset s
:Done
unset linepos
NPE_CONSOLE v-
npp_console enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment