Opening Notepad++ in Post-It mode
-
I’m trying to create a shortcut that will open a file in NP++ at specific coordinates, with the title bar, status bar, line numbers, etc. all hidden.
Is there a way to make the Post-It mode (F12) persist between sessions (via
config.xml) or, alternatively, open NP++ in Post-It mode via command line? I can see here there’s an-alwaysOnTopflag, but I don’t see one for Post-It mode. -
I don’t think Notepad++ supports opening in Post-It mode directly, and as you’ve observed, that mode isn’t persistent between runs.
You might have luck using a scripting plugin (e.g. PythonScript) and having a startup script that executes the Post-It command, e.g.
notepad.menuCommand(MENUCOMMAND.VIEW_POSTIT).You may be able to do something similar with the NppExec plugin; I wouldn’t know the details on that.
-
@Alan-Kilborn said in Opening Notepad++ in Post-It mode:
You may be able to do something similar with the NppExec plugin; I wouldn’t know the details on that.
For NppExec, put the following in your startup script (Plugins => NppExec => Advanced Options… => “Execute this script when Notepad++ starts”):
NPP_MENUCOMMAND "View\Post-It"Cheers.
-
@Michael-Vincent Thanks, I’ve managed to make this work with my use case. In case anyone’s interested, this is roughly what I’m doing (AHK code):
fileOpen := false ^+b:: if not fileOpen { fileOpen := true FileCopy, Backup\Notepad++\config (PostIt).xml, %A_AppData%\Notepad++\config.xml, 1 FileCopy, Backup\Notepad++\NppExec (PostIt).ini, %A_AppData%\Notepad++\plugins\config\NppExec.ini, 1 Run, "C:\Program Files\Notepad++\notepad++.exe" "C:\Path\To\PostIt\File.txt" } else { fileOpen := false FileCopy, Backup\Notepad++\config.xml, %A_AppData%\Notepad++\config.xml, 1 FileDelete, %A_AppData%\Notepad++\plugins\config\NppExec.ini } returnThe
config (PostIt).xmlis the file with my PostIt NP++ configuration (i.e., no title bars, line numbers, etc.) andconfig.xmlis my usual NP++ configuration. TheNppExec (PostIt).inifile is the configuration file for the NppExec plugin, which launches a script on startup that contains the following:NPP_CONSOLE 0 NPP_MENUCOMMAND "View\Post-It"This now seems to work as I want it. Thank you both for the help.
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