Notepad++ tools to use it as a syntax editor for SPSS. Includes syntax highlighting and macro/plugin to run selected code in SPSS.
This has been used with Notepad++ v6.8 and higher, and specifically with SPSS 23. It may work with other/older versions, but your mileage may vary, especially in syntax highlighting.
##To install the syntax highlighting
- In Notepad++, click on Language-->Define your language...and click on the Import... button.
- Choose the spss23.xml file.
- That's it! It should also associate that user-defined language (named SPSS) with .sps file extensions.
##To install the run selected code in SPSS tool
- In Notepad++, you need to have NPPConsole as well as NPPExec installed.
- In SPSS, you need to have the SPSS Statistics - Essentials for Python installed.
###To use the run selected code in SPSS tool
- Make sure you have SPSS already running.
- Select the code you want to run in SPSS.
- Click
###More explanation of the SPSS tool
- Using NPPExec, the selected lines are saved to a temporary file.
- Two Python for SPSS files are prepended and appended to the temporary file, which is then saved as a python file and run by SPSS' statisticspython.bat file.
###Known issues
- The first line selected in Notepad++ always throws an error for some reason, so the selected code always needs to start with a comment line (as failing on that doesn't affect your analysis).
- This approach was used so that the output from SPSS would show all the commands and responses. Using other approaches wouldn't allow that, and made debugging/checking your results pretty impossible.