--This article uses borland
bcc32 -n Output path inputFile.c
Don't put a space
behind the -n
--The character code of the program source file and the batch file to be created are unified to Shift-JIS here. --If you see garbled characters, try changing the character code.
--A plugin that can execute multi-line commands at once. --You can manage those commands like a script. --Create a script as a menu item / hotkey candidate and provide it to Notepad ++. --For installation, Plugin Menu> Plugin Management> Check> Install
--Run the compiled EXE file at an external command prompt --Pause automatically at the end of execution to keep the window --The creation folder can be anywhere
runC.bat
@%1
@echo -----------------------------------------------
@echo -----------------------------------------------
pause
--Plugins> NppExec> Execute
--Enter the code below and rewrite [Content] according to your environment
--Click OK and check the operation
--Once confirmed, open Plugins> NppExec> Execute again, name the script and save it (eg runC
)
runC
NPP_SAVE
set obj = $(CURRENT_DIRECTORY)\$(NAME_PART)
cd 【C:\C\borland\Bin】
【bcc32 -n$(CURRENT_DIRECTORY) $(obj).c】
cd $(CURRENT_DIRECTORY)
NPP_RUN 【B:\USER_FLODER\document\runc.bat】 "$(obj).exe"
unset obj
$ (XXX)
is the [environment variable] of Notepad ++ (https://so-zou.jp/software/tech/tool/editor/notepad-plus/plug- in / nppexec /)--Plugins> NppExec> Advanced Options> Pay attention to the Menu Item column at the bottom left
--Enter the menu item display name (eg runC
), select the script, and register with Add / Modify.
--Click OK at the bottom right, and the message box "Changes will not be reflected until Notepad ++ is restarted" appears.
--Notepad ++ restart
--Settings> Shortcut Management> Plugins Tab
--Set a shortcut key for runC
--If there is a conflict, you can cancel it if the shortcut of the conflicting menu item is not used.
runj.bat
@java %1
@echo -----------------------------------------------
@echo -----------------------------------------------
pause
runJ(Script for NppExec)
NPP_SAVE
set obj = $(CURRENT_DIRECTORY)\$(NAME_PART)
cd $(CURRENT_DIRECTORY)
"C:\Program Files\Java\jdk1.8.0_181\bin\javac.exe" $(obj).java
NPP_RUN B:\USER_FLODER\document\Java\runJ.bat $(NAME_PART)
unset obj
Recommended Posts