Notepad++ v8.3.2 release - Declare variables, not war
-
@vitalii-dovgan said in Notepad++ v8.3.2 release - Declare variables, not war:
Hmm, I tried to reproduce it today with different scenarios - and could not. Though it was stably reproducible yesterday.
Now I’m having a strong confidence that the issue was connected to improper invocation of Notepad++ from my side. Sorry for the previous misleading.
Anyway, as the result I’ve created a batch script that can be used to add a context menu item “Edit with Notepad++” for a single file and “Open in Notepad++” for a folder, using either a portable or an installed version of Notepad++. If interested, you can place this file directly into the Notepad++ folder and run it there.
The content of “npp_context_menu.cmd” :
@echo off echo Initialization... set EXEDIR=%~dp0 set "EXE=%EXEDIR:\=\\%notepad++.exe" set REGFILE=npp_context_menu.reg if exist "%REGFILE%" del "%REGFILE%" echo Writing "%REGFILE%"... 1>>"%REGFILE%" echo Windows Registry Editor Version 5.00 1>>"%REGFILE%" echo. 1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\*\shell] 1>>"%REGFILE%" echo. 1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\*\shell\notepadpp_edit_file] 1>>"%REGFILE%" echo @="Edit with &Notepad++" 1>>"%REGFILE%" echo "Icon"="\"%EXE%\",0" 1>>"%REGFILE%" echo. 1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\*\shell\notepadpp_edit_file\command] 1>>"%REGFILE%" echo @="\"%EXE%\" -nosession \"%%1\"" 1>>"%REGFILE%" echo. 1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\Directory\shell] 1>>"%REGFILE%" echo. 1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\Directory\shell\notepadpp_edit_folder] 1>>"%REGFILE%" echo @="Open in &Notepad++" 1>>"%REGFILE%" echo "Icon"="\"%EXE%\",0" 1>>"%REGFILE%" echo. 1>>"%REGFILE%" echo [HKEY_CLASSES_ROOT\Directory\shell\notepadpp_edit_folder\command] 1>>"%REGFILE%" echo @="\"%EXE%\" -multiInst -nosession -openFoldersAsWorkspace \"%%1\"" 1>>"%REGFILE%" echo. REM Converting to UCS-2 LE (not mandatory) if exist "%~dp0..\sfk\sfk.exe" set PATH=%PATH%;%~dp0..\sfk sfk atow "%REGFILE%" -tofile "%REGFILE%" if not exist "%REGFILE%" goto ErrorNoRegFile echo Registering "%REGFILE%"... start "Registering %REGFILE%" "%REGFILE%" goto Done :ErrorNoRegFile echo ERROR: "%REGFILE%" does not exist! pause goto Done :DoneThis invokes Notepad++ using its
-nosessioncommand line argument to not affect the opened file history (this is especially useful when opening a folder). -
This post is deleted! -
P PeterJones locked this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login