2016年9月23日 星期五

How do you compile and/or run Python, Golang, Node.js Nodejs , C++ within notepad++?

Using 32 bit Notepad++ 7.5.7

Python


Download NppExec
https://sourceforge.net/projects/npp-plugins/files/NppExec/
Download NppExec Plugin v0.6 RC2.zip
Download https://nppexec_083_dll_x64.zip/ on 2023
Extract and copy so that C:\Program Files (x86)\Notepad++\plugins\NppExec\NppExec.dll

https://github.com/d0vgan/nppexec/releases/tag/v06-RC2

NppExe Console UTF8

Most of the time you want NppExe console displays UTF8 where the default is OEM(DOS)

NppExec > Console Output/Input Encoding > Output from OEM(DOS) to UTF-8 (Input default OEM)

NppExec F6

Plugins NppExec Execute (F6) is much more powerful than plain Run (F5).
Then in F6 add/save the following:
NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
C:\Python34\python.exe -u "$(FULL_CURRENT_PATH)"

NppExec Shift + F6

In Plugins NppExec Console output filters (Shift+F6) add the following HighLight mask:

  File "C:\Users\ricky\Downloads\a.py", line 2, in <module>
*File "%FILE%", line %LINE%
Red: FF
Checked: U for underlined



Run F6






Go


NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
go.exe run "$(FULL_CURRENT_PATH)"

.\a.go:6:7: syntax error: unexpected int at end of statement

*%FILE%:%LINE%:*error*

Notepad++ Golang Syntax

Language > User Defined Language Format > Import > golang.xml




Node.js

Similar to Python:

NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
C:\Program Files\nodejs\node.exe "$(FULL_CURRENT_PATH)"


Java

Similar to Python:

NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
java -cp . "$(FILE_NAME)"



Visual Studio C++


NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" && cl /EHsc "$(FULL_CURRENT_PATH)" && $(NAME_PART).exe

NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" && cl /EHsc "$(FULL_CURRENT_PATH)" && $(NAME_PART).exe



*%FILE%:%LINE%:*error*




Clang++ (2023)

Similar to Python:

NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
C:\msys64\mingw64\bin\clang++.exe "$(FULL_CURRENT_PATH)"
$(NAME_PART).exe


gPRC Python

NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
python -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. $(FILE_NAME)

Julia

Similar to Python:

NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
C:\Users\ricky\AppData\Local\Julia-1.3.1\bin\julia.exe "$(FULL_CURRENT_PATH)"

R Programming

Similar to Python:

NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
"C:\Program Files\R\R-4.2.1\bin\x64\Rscript" "$(FULL_CURRENT_PATH)"






End

沒有留言:

張貼留言

2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...