I recently learned about a text editor called Notepad ++ and it was easy to use, so I started using it. So, open the command prompt yourself and execute it. Since the operation was troublesome, I made it possible to execute it just by pressing Ctrl + F5 on Notepad ++, so I would like to make a note of that up to this point. ** Caution ** It is assumed that Python is built on Anaconda on Windows. Also, please note that this article does not describe how to install Python itself.
https://notepad-plus-plus.org/ Please open the official website above and click download under home displayed on the left side. Click the link under Download 32-bit x86 or Download 64-bit x64 on the site you opened to download. (If you don't like zip, choose what you want.) 32bit Notepad++ zip package 32-bit x86: Don't want to use installer? Check this one (zip format). 64bit Notepad++ zip package 64-bit x64: Don't want to use installer? Check this one (zip format).
If you can download it, unzip it in your favorite location. Rename the unzipped file and move it to any location you like.
First, let's set from Japanese localization.
Let's open the file that you renamed or moved to a location of your choice. Then, open notepad ++. Exe in the red square in the image below. After opening, click Settings → Preferences from the menu. (Click the red square in the image below.) Click General from the left list on the screen that appears, and click Japanese from the Localization drop-down list on the right. (Click the red part in the image below.) Now you can translate it into Japanese. Next, set the tab. However, if you don't need to replace tabs with spaces, skip the next tab setting.
Select the language menu from the list on the left side of the environment setting screen that was opened when you translated it into Japanese. Once you have made your choice, check the checkbox to the left of Replace with a space. This completes the tab settings. Press the close button at the bottom to close the dialog. Next, set the half-width space and tab display. (If you do not need this setting, skip the next half-width space and tab display settings.)
First, click View → Show Control Characters → Show Half-width Spaces and Tabs from the menu. (Click the red part of the image.) This completes the settings.
First, reopen the file that you renamed or moved to a location of your choice.
In that file, right-click in the margin etc. → New → Select Text Document to create a text file.
Let's rename the created text document to
If you make changes, you may see this screen, but click Yes.
Then right-click on the `` `python_exe.bat``` you just created and click Edit. (You can reopen it from Notepad)
** Caution ** If you name it
`python.bat``` or `cmd.bat``` here, a loop may occur at runtime and it may not end.
Be careful when naming.
Write the following in the opened notepad. If you haven't built a Python virtual environment with Anaconda
@echo off call python "%1" pause
If you are building a Python virtual environment with Anaconda
@echo off call activate virtual environment name call python "%1" call deactivate pause
*** Caution ** In my environment, since I am building a virtual environment with Anaconda, I am using the code written below. The code I wrote above doesn't work, so if you've tried it and it doesn't work, check it out or use something other than this article.
After writing in Notepad, save it by overwriting and close it.
Let's create a python file to execute temporarily. Notepad ++, which has been open since earlier,
And press * Save As * from the file. Then select the file type ``` Python file (* .py; *. Pyw)` `` and save it with a name of your choice. As it is, click Run → Run from the menu (click the red square in the image below.) Once opened, enter the following in the drop-down list: (If you changed the name of the batch file, please change the part of python_exe.bat.)
![file10.png](https://qiita-image-store.s3.amazonaws.com/0/199097/b0035d62-b74a-91fa-d9a5-41c7ac7ff310.png) Then press the register button. Then, you will see a screen like the one in the image below, so enter Python for the Name. Also, check the checkbox to the left of CTRL and Select F5 from the drop-down list on the right that says None and select the OK button. ![file11.png](https://qiita-image-store.s3.amazonaws.com/0/199097/49fd694d-4876-e999-8185-fcf6c805de08.png) Then, close the execution ... dialog with the X button. This is the end. Finally, press ctrl + F5,
Hello World Press any key to continue. . .
If it comes out, it means that the setting was successful. If you have any mistakes or precautions, it would be helpful if you could point them out. # Supplement (32-bit version only, how to install Plugin Manager and NppExec) In the comment, only the 32-bit version is available, but I have told you how to install NppExec, so I will supplement it. Notepad ++ 7.5 does not include Plugin Manager in both 64-bit and 32-bit versions. The reason is that the embedded version is currently being created to avoid the inclusion of advertisements in the Plugin Manager. However, the 32-bit version seems to work by porting an older version of Notepad ++. I will explain how to do this. ※**Caution** Under this, by using an older version of Plugin Manager, in the 32-bit version of Notepad ++ 7.5 It enables the Plugin Manager, but something may go wrong. Therefore, please install Plugin Manager from here onward at your own risk. ## Introduction of Plugin Manager First, the 32-bit version of Notepad ++ 7.5 was explained at the beginning of this article, so I will omit it. Then go to the official page below. https://notepad-plus-plus.org/download/v7.4.2.html Under Download 32-bit x86 on the site Notepad++ zip package 32-bit x86: Don't want to use installer? Check this one (zip format). Download the old version from where it says. Next, unzip the downloaded one and open the plugins in that folder (red square in the image) (1) ![file12.png](https://qiita-image-store.s3.amazonaws.com/0/199097/b2b6664b-a1b2-4042-17df-6955318770df.png) Then, at the beginning of this article, open the renamed or moved file. (2) Similarly, let's open plugins. (1) Copy PluginManager.dll from the plugins opened in (1). ② Paste it in the plugins opened in (2). ③ Open the Config folder in the folder (1), copy PluginManager.ini in it, and ④ Open the Config folder in the folder (2) and paste it in it. After completing the above operations, if you start (2), you will find that Plugin Manager is increasing in the plugins in the menu. ## Introduction of NppExec Use the one added in the introduction of Plugin Manager. First, click Plugins → Plugin Manager → Show Plugin Manager in the menu. (Click the red square in the image below.) ![file13.png](https://qiita-image-store.s3.amazonaws.com/0/199097/9beaf5be-b04e-c491-d0fb-8b23e8422cc5.png) Click to open the Plugin Manager, click the Updates tab and click Make sure that the left side of Plugin Manager in it is checked. Then click the Update button. When the update is complete, a screen like the one in the image below will appear. Click Yes. (A confirmation screen for User Account Control may appear in between, but in that case, please allow it.) ![file14.PNG](https://qiita-image-store.s3.amazonaws.com/0/199097/068e01d7-0a69-d60d-f607-fc25a1fd0cdd.png) Then Notepad ++ disappears and reopens. Once again, open Plugins → Plugin Manager → Show Plugin Manager in the menu. If you see Plugin Manager in the list on the Updates tab, check it and update again. Also, open Plugins → Plugin Manager → Show Plugin Manager in the menu. Now find NppExec in the list view in the Available tab and check the checkbox on the left. Then click the Install button. ![file15.png](https://qiita-image-store.s3.amazonaws.com/0/199097/ab417bdc-3cc3-1225-a61c-387d50f6bd81.png) When the installation is complete, a screen like the one in the image below will appear. Click Yes. ![file16.png](https://qiita-image-store.s3.amazonaws.com/0/199097/550b8625-2651-50b7-01df-54744a431947.png) If you click it, it will be restarted, so if NppExec is added in the plugin of the menu after startup, it will end. # Reference site https://notepad-plus-plus.org/news/notepad-7.5-released.html https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3651 https://so-zou.jp/software/tech/tool/editor/notepad-plus/plug-in/nppexec/ # environment OS Windows 10 Pro (64 bit) Notepad++ 7.5 Anaconda-4.2.9 Python 3.5.2