Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?
-
@PeterJones Sorry it took so long. I was dealing with a lot of issues. Washing machine, car, and several other things.
I tried installing Python v3.0.24 msi, and zip Full, but I don’t see it anywhere in the Plugins section. Initially, I installed 2.1. I uninstalled it and tried installing v3.0.24, but 2.1 is still there.
What am I doing wrong?
P.S. I didn’t try any of the v3.0.24 x64, PluginAdmin, Min, or TclTk.
-
I tried installing Python v3.0.24 msi, and zip Full, but I don’t see it anywhere in the Plugins section. Initially, I installed 2.1. I uninstalled it and tried installing v3.0.24, but 2.1 is still there.
What am I doing wrong?
Since you just gave a high-level description, rather than any actual data, it’s really hard to tell.
I uninstalled it and tried installing v3.0.24, but 2.1 is still there.
Then you didn’t uninstall it. Please note that under many conditions, the Plugins Admin uninstall button doesn’t work if Notepad++ has accessed the PythonScript plugin at all that run, because it’s loaded the DLL into memory, and thus cannot delete the file – so if you have any AT START, that virtually guarantees that uninstall button won’t work. (I believe there was an Issue or PR to try to make uinstall button more reliable, but I don’t remember whether that was implemented, or whether it was even feasible.) So, anyway, your best bet is to exit Notepad++ completely, and delete
C:\Program Files\Notepad++\plugins\PythonScript\.P.S. I didn’t try any of the v3.0.24 x64, PluginAdmin, Min, or TclTk.
You didn’t try the 64-bit version of PythonScript? The last time you shared Debug Info (and the time before that) you were using 64-bit Notepad++. So why would you try anything but 64-bit PythonScript. It is 100% guaranteed that it will not work if you try to use the 32-bit PythonScript with a 64-bit Notepad++.
If you ran the 32-bit MSI on a 64-bit OS, it would have tried to install the plugin into
C:\Program Files (x86)\Notepad++\Plugins\PythonScript, which, of course, couldn’t be seen if you are running the 64-bit Notepad++ executable atC:\Program Files\Notepad++\notepad++.exe.If you tried one of the zips, you didn’t say where you put it, or what the directory hierarchy would have been. But if you were still seeing PythonScript 2.1 in Notepad++, it means you didn’t put it in the right place. And I have no clue where you would have put it.
So the things you will need to do:
- Run Notepad++ as normal, and verify with Debug Info that you are using 64-bit, and that it is running from
c:\Program Files\Notepad++.- If you don’t get it working after these instructions, you must share your Debug Info, otherwise it will be impossible to give you better instructions.
- The rest of these instructions will assume normal installation directory, normal 64-bit Notepad++
- Exit Notepad+++ completely. No instances running.
- Go to
C:\Program Files\Notepad++\plugins\PythonScript\. If there’s anything in there, remove it (and the directory) - Grab
PythonScript_Full_3.0.24.0_x64_PluginAdmin.zip(I don’t use the MSI, so cannot give reliable instructions for that MSI installation method). Unzip it so that the following exist:C:\Program Files\Notepad++\plugins\PythonScript\PythonScript.dllC:\Program Files\Notepad++\plugins\PythonScript\python312.dllC:\Program Files\Notepad++\plugins\PythonScript\doc\C:\Program Files\Notepad++\plugins\PythonScript\lib\C:\Program Files\Notepad++\plugins\PythonScript\scripts\
If those aren’t all there, you didn’t unzip things correctly.
- Start Notepad++. It should show PythonScript in the Plugins menu, and Plugins > Python Script > About should show plugin version 3.0.24.0 with Python 3.12.0

If it’s not working for you after following those instructions, you must share
- ?-menu’s Debug Info
dir "c:\Program Files\Notepad++"dir "c:\Program Files\Notepad++\Plugins"dir "c:\Program Files\Notepad++\Plugins\PythonScript"
- Run Notepad++ as normal, and verify with Debug Info that you are using 64-bit, and that it is running from
-
@PeterJones I’m having trouble correctly unzipping PythonScript_Full_3.0.24.0_x64_PluginAdmin.zip
I tried putting the zip file into the plugins folder via Plugins > Open Plugins Folder, but Windows won’t allow unzipping in that location.
I tried unzipping in my Compressed folder, then put all of the unzipped items into the Plugins Folder. That didn’t work either.
I checked, and I only see Python Script 2.1 in Plugins Admin. Strange, because I deleted those items.
-
You may need UAC / Admin permission to write to the Plugins directory.
If PythonScript 2.1 is still there, you didn’t delete the right directory.
I told you what information we would need to help you further, and you chose to not share it
Good luck.
-
@PeterJones Oops, I was so wrapped up in trying to make it work, I forgot!
I don’t see anything with Plugins in the Debug info.
Notepad++ v8.9.2 (64-bit)
Build time: Feb 13 2026 - 02:47:53
Scintilla/Lexilla included: 5.5.8/5.4.6
Boost Regex included: 1_90
pugixml included: 1.15
nlohmann JSON included: 3.12.0
Path: C:\Program Files\Notepad++\notepad++.exe
Command Line: “D:\D Drive Documents\Znew 2.tex”
Admin mode: OFF
Local Conf mode: OFF
Cloud Config: OFF
Periodic Backup: ON
Placeholders: OFF
Scintilla Rendering Mode: SC_TECHNOLOGY_DEFAULT (0)
Multi-instance Mode: monoInst
asNotepad: OFF
File Status Auto-Detection: cdEnabledNew (for current file/tab only)
Dark Mode: OFF
Display Info:
primary monitor: 3840x2160, scaling 175%
visible monitors count: 1
installed Display Class adapters:
0000: Description - NVIDIA GeForce RTX 2080 SUPER
0000: DriverVersion - 32.0.15.8157
OS Name: Windows 10 Home (64-bit)
OS Version: 22H2
OS Build: 19045.6466
Current ANSI codepage: 1252
Plugins:
mimeTools (3.1)
NppConverter (4.7)
NppExport (0.4)
_CustomizeToolbar (5.3) -
@Troglo37 said in Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?:
@PeterJones Oops, I was so wrapped up in trying to make it work, I forgot!
I don’t see anything with Plugins in the Debug info.
What I see in the Debug Info is:
- It really is 64-bit Notepad++ in the normal installation directory, with normal AppData config and not running in Admin mode
- You do not have PythonScript 2.1 at this point
What I don’t see in your answer are any of the directory listings that my post requested. :-(
At this point, the steps I would take, if I were you and trying to get this working:
- Exit Notepad++
- Do the directory listing(s) that I suggested above, to see whether there’s a PythonScript directory and what’s in it
- Do the unzip described above, making sure to say yes to the UAC to allow you to put files in the protected directory (it may be that Windows is showing the UAC prompt, but it might not put it to the foreground – if you don’t see the prompt, check your taskbar for the UAC icon and click on it if it’s there)
- Do the directory listing(s) again, to make sure it correctly populated. If it didn’t, try again.
- Run Notepad++, and check for PythonScript. If it’s there, look at the About.
If it’s still not installed 3.0.24, you will need to show us the directory listings from 2 and 4, and any dialogs or error messages you see at any point in the instructions.
-
@PeterJones I’m confused about a couple of things.
- I’m not sure what you mean by supplying the following debug info. How do I do that? The only thing I know how to do is what I provided to you.
?-menu’s Debug Info
dir “c:\Program Files\Notepad++”
dir “c:\Program Files\Notepad++\Plugins”
dir “c:\Program Files\Notepad++\Plugins\PythonScript”- Please give exact instructions on how and where to extract the file. Should I extract the file to a folder, and then move the extracted contents to a particular location? Or should I put it in a particular location before extracting it?
P.S. I manually opened c:\Program Files\Notepad++. There are no Python files or folders in the Plugin folder.
-
@Troglo37 said in Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?:
@PeterJones I’m confused about a couple of things.
I’m not sure what you mean by supplying the following debug info. How do I do that? The only thing I know how to do is what I provided to you.
?-menu’s Debug Info
Right. That was the Debug Info that was in your last post.
dir “c:\Program Files\Notepad++”
dir “c:\Program Files\Notepad++\Plugins”
dir “c:\Program Files\Notepad++\Plugins\PythonScript”Since that same syntax has been used for directory listings in the Microsoft OS command -line environment since the 80s (in DOS back then, and in cmd.exe in modern Windows), I assumed my meaning was obvious. Since it wasn’t, I will explain: Those are me asking for directory listings for each of those directories.
Please give exact instructions on how and where to extract the file.
Do you not know how to unzip a .zip in Windows? You right click, and choose to extract all. Easiest is to put it in a temporary directory to start. Then copy all the contents of that directory, and put it into
C:\Program Files\Notepad++\Plugins\PythonScript(which is the destination directory that I already told you about, above)After you have done that, the directory should contain the files and subdirectories I mentioned above.
If it doesn’t, give me something to work with: Screenshots, text dumps of directory listings, whatever you can do to give me real information, rather than vague responses.
-
@PeterJones I got it to work. I copied the files as instructed. However, there are a few things I need to know.
-
Should I delete python27.dll from the PythonScript folder? This time, I copied and pasted and followed the prompt to replace the existing files. Last time, I deleted everything before copying over the extracted files. Is that why it didn’t work?
-
How is the script enabled? The only way I can figure out how to make the script work is via the toolbar, Plugins > PythonScript > Run Previous Script (No New Lines)
-
Is this the only way to enable it? Is there a way to make it automatic? Or at least, an icon on the toolbar? I tried doing that via Plugins > PythonScript > Configuration, but to no avail.
-
Is it possible for the script to work without first pasting the IMDB text into the Find search box?
-
-
- Should I delete python27.dll from the PythonScript folder? This time, I copied and pasted and followed the prompt to replace the existing files. Last time, I deleted everything before copying over the extracted files. Is that why it didn’t work?
How could it be there? You literally said last time that the directory didn’t exist. If the directory didn’t exist, python27.dll cannot be in it already. If it did exist, you should have said it did exist.
- How is the script enabled? The only way I can figure out how to make the script work is via the toolbar, Plugins > PythonScript > Run Previous Script (No New Lines)
Plugins > PythonScript > Scripts>
No New Linesis the normal way to run the script.The script doesn’t magically replace the old paste behavior: you run the script instead of doing a normal paste.
- Is this the only way to enable it? Is there a way to make it automatic? Or at least, an icon on the toolbar? I tried doing that via Plugins > PythonScript > Configuration, but to no avail.
The FAQ explains how to add a shortcut and, IIRC, how to add a toolbar button.
- Is it possible for the script to work without first pasting the IMDB text into the Find search box?
The script has absolutely nothing to do with the Find box. I have no clue how you got the impression that it requires that.
-
@Troglo37 said in Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?:
Is there a way to make it automatic?
If register a callback to respond to the notification
SC_MOD_INSERTCHECKthen it can be automated to change the text before insertion. This example code can be added to the userstartup.pyfile. Make sure the PythonScript configuration is set toATSTARTUP.import re def event_paste_single_line(args): SC_MOD_INSERTCHECK = 0x100000 if args['modificationType'] & SC_MOD_INSERTCHECK: text = args['text'] if ' episode\r\n ' in text: result = notepad.messageBox('Paste text as single line?', 'InsertCheck', MESSAGEBOXFLAGS.ICONQUESTION | MESSAGEBOXFLAGS.YESNO) if result == MESSAGEBOXFLAGS.RESULTNO: return text = re.sub(r'\s+', ' ', text) editor.changeInsertion(text) editor.callbackSync(event_paste_single_line, [SCINTILLANOTIFICATION.MODIFIED])I added a messagebox to allow a choice rather then being fully automatic with the text change.