Problem with Margins in PythonScript Plugin and Margins in Distraction Free mode
-
@Neko-Nekokovic said in Problem with Margins in PythonScript Plugin and Margins in Distraction Free mode:
I cannot make any User script to appear in Plugins > Python Script > Scripts
Even if you manually create a file in the correct place?
For me, sometimes the New Script wants to save my intended new file in a weird directory, i.e., not the Scripts directory. :-(
So if it happened to do that to you, then you went to the Scripts menu, that script wouldn’t appear.So by “manually create” I mean, make a .py file without using the New Script command…
If you suspect the same kind of weird thing is happening to you, try opening one of the “Samples” scripts by holding Ctrl while clicking on it in the menus, then when it opens do a SaveAs but when saving move up one folder level, i.e., don’t save it in the “Samples” folder, but the parent of samples. And give it a new base name, e.g. “testme.py”.
Then see iftestme
appears in the Scripts menu. -
Even if you manually create a file in the correct place?
Yes. Well, this is a bit different. I’m unable to create a new text file in C:\ProgramFiles\Notepad++\plugins\Config\PythonScript\scripts
The only option I have is this
So to overcome this what I’ve managed to do is - I’ve created a text file on Desktop. Pasted python scirpt there. Saved it as a .py file. And then successfully moved it over in:
C:\ProgramFiles\Notepad++\plugins\Config\PythonScript\scriptsThat’s how “proba.py” and “startup.py” are there. Upon moving, it asked me to “Continue” with Admin rights which I have clicked.
If you suspect the same kind of weird thing is happening to you, try opening one of the “Samples” scripts by holding Ctrl while clicking on it in the menus, then when it opens do a SaveAs but when saving move up one folder level, i.e., don’t save it in the “Samples” folder, but the parent of samples. And give it a new base name, e.g. “testme.py”.
Then see if testme appears in the Scripts menu.
That worked indeed! Now I see “proba.py” listed.
But if I go Plugins > Python Script > Configuration every script that I see is under “Machine scripts” and none in “User scripts”.
-
@Alan-Kilborn The thing that I’ve found in one of the above linked posts is this. This is exactly what I’ve want and it seems that someone managed to make it that way.
Although I’d exclude numbers as well, but that is trivial.
But the thing that I don’t understand in this picture, or in that post is - A guy below said that it was a feature that was going to be available after v7.9.6 release. Do you know anything about it?
-
Oh, wait, it appears I gave bad advice. The “Samples” are considered “machine scripts”. :-(
Sorry, but I honestly don’t think about this much, because I don’t have such troubles…OK, so user scripts are under
...\Config\PythonScript\scripts
(note the important part of that is “Config”).Machine scripts are NOT under
Config
.The only option I have is this
So if “this” is a link to a screenshot, don’t do that, just Ctrl+v paste an image directly. Nobody is clicking links that aren’t immediately recognizable.
But if I go Plugins > Python Script > Configuration every script that I see is under “Machine scripts” and none in “User scripts”.
You have clicked on this, right?:
-
@Neko-Nekokovic said in Problem with Margins in PythonScript Plugin and Margins in Distraction Free mode:
The thing that I’ve found in one of the above linked posts is this. This is exactly what I’ve want and it seems that someone managed to make it that way.
Again, nobody is clicking on such a “this” link.
Paste a screenshot right into your posting.But the thing that I don’t understand in this picture, or in that post is - A guy below said that it was a feature that was going to be available after v7.9.6 release. Do you know anything about it?
I can’t answer questions deriving from links I’m not clicking on. :-)
-
So if “this” is a link to a screenshot, don’t do that, just Ctrl+v paste an image directly. Nobody is clicking links that aren’t immediately recognizable.
Ah, okay.
And that was from a post named “Is there a distraction-free writing mode like Vimroom(a plugin of Vim)?” on this website. So if you don’t want to click a link of it, you can go there and find this part.
-
You have clicked on this, right?
Yes. That’s what I meant when I said “User Scripts” is empty.
-
@Neko-Nekokovic said in Problem with Margins in PythonScript Plugin and Margins in Distraction Free mode:
And that was from a post named “Is there a distraction-free writing mode like Vimroom(a plugin of Vim)?” on this website. So if you don’t want to click a link of it, you can go there and find this part.
Or YOU could have just provided this link.
-
@Alan-Kilborn said in Problem with Margins in PythonScript Plugin and Margins in Distraction Free mode:
A guy below said that it was a feature that was going to be available after v7.9.6
That “guy” is the author of Notepad++. :-)
Turns out after reviewing that other thread that he meant “Distraction free mode” would be available…and that made it into v8.0 (there was no v7.9.6). -
Or YOU could have just provided this link.
I guess there is a misunderstanding here.
You’ve said earlier:
Again, nobody is clicking on such a “this” link.
And in the last comment you’ve said:
Or YOU could have just provided this link.
I understand that pictures should have been pasted as images, but either way you cannot know what is on the “link” no matter how I name it. You don’t know if it’s a link to a post or a link to an image. If you’re not clicking “this link” then why would I provide a link in the first place?
I guess you can have a preview when you hover over a link, but https://ibb.co/… is a popular domain as far as I know. I’ve seen it many times since many people link images from imgBB website and that is their domain. It’s quite popular so I don’t understand what was the problem.
I guess we don’t understand each other here.
That “guy” is the author of Notepad++. :-)
Ah cool.
Oh only Distraction Free mode. :/But in that post, the picture shows exactly what I want to achieve. I guess it is possible, I just don’t know how.
-
@Neko-Nekokovic said in Problem with Margins in PythonScript Plugin and Margins in Distraction Free mode:
I guess we don’t understand each other here.
I think we do…
I guess you can have a preview when you hover over a link
Yep, which is exactly how I know where links lead, no matter what they say, e.g. a blue/purple this.
but https://ibb.co/… is a popular domain as far as I know
And it is blocked by my I.T. department since it is so popular.
And since I do all of my Notepad++ work on my work PC, in my spare time at work, I can’t click on those links. Well, I can, but they won’t lead anywhere.But in that post, the picture shows exactly what I want to achieve
I think first things first…you need to get beyond problems with putting script files in user scripts folder and having them appear in the Notepad++ menus…are you beyond that?
-
@Alan-Kilborn said in Problem with Margins in PythonScript Plugin and Margins in Distraction Free mode:
I think we do…
Well we haven’t on this very issue then.And it is blocked by my I.T. department since it is so popular.
What does that mean? Which I.T. department? I don’t understand what that means. Why would a link from imgBB be banned or blocked?
Is there any other “imageToLink” website that isn’t blocked by anyone and that you would happily open even if it’s a picture in the link? What about Imgur? I’m curious now. I’ve never heard that someone blocks that website. Is there any specific reason? (Well I am sure there is, the question is rather - what is the reason behind the block?)
I think first things first…you need to get beyond problems with putting script files in user scripts folder and having them appear in the Notepad++ menus…are you beyond that?
Yeah I agree. Well, no. I’ve managed to make them appear only if I put them in “Machine Scripts”. If I save them in Config/PythonScript/scripts nothing seems to show up.
I should fix that first definitely. I hope I’ll find a way. Currently I have no idea how to overcome that.
-
@Neko-Nekokovic said in Problem with Margins in PythonScript Plugin and Margins in Distraction Free mode:
Which I.T. department?
Umm, the one where I am employed?
Why would a link from imgBB be banned or blocked?
To keep people from going there.
Is there any other “imageToLink” website that isn’t blocked by anyone and that you would happily open even if it’s a picture in the link? What about Imgur?
Imgur was used here before the forum software got the ability to directly paste images. So, yes, I could access that one.
But it is all kind of pointless, because we CAN paste here directly and there is no reason at all to user external sites for such things. -
I have not read the whole thread but from what I understand you
have Npp installed and so I assume your configuration directory
is the one in APPDATA, could that be?
If not, can you paste your debug information, which is available
from the last menu item (the ? menu
)? -
I know this is going back to the beginning, but I’ve been away for a few days.
@Neko-Nekokovic originally said,
lso is it possible that I can edit Margin values inside of Distraction Free mode? Currently the default is quite a bit “wider” than my 80 characters centered.
yes. That’s why there’s a setting for it.
On my current monitor, which could handle about 230 characters wide in true full-screen mode (View > Toggle Full Screen): if Settings > Preferences > Margins/Border/Edge > Padding > Distraction Free is at 9 (the widest), I get about 170 characters wide in Distraction Free mode, and at 3 (the narrowest), I get about 70 characters wide; and at the default 4, I get about 110 characters wide.
If that’s not enough range for you, then you will have to go through the PythonScript rigamarole, as has already been described to you.
As has been described, though I’ll phrase it differently:
C:\Program Files\Notepad++\plugins\PythonScript\scripts
is for “machine scripts”. For a standard installation, user scripts will go in the%AppData%
config directory, which is technically%AppData%\Notepad++\plugins\config\PythonScript\scripts
(which you can paste directly into Windows Explorer or the File > Save As dialog) – this will probably resolve to something likeC:\users\<your user name here>\AppData\Roaming\Notepad++\plugins\config\PythonScript\scripts
, but the infinite number of Windows conifgurations possible means this is not guaranteed – whereas just pasting in the%AppData%
-based path will work on any Windows installation I’ve used in the last couple decades. And, as @Ekopalypse said, if you are having trouble finding the user-scripts directory, using the ?-menu’s Debug Info, and copying that debug info and pasting into your reply, will tell us where your user-script location will be. -
Umm, the one where I am employed?
And where are you employed?
To keep people from going there.
Oh come on man, that’s circular.
“Why is it banned? Because people should not use it.
Why should people not use it? Because it’s banned.”Why would you want to keep someone from using imgBB or Imgur?
Imgur was used here before the forum software got the ability to directly paste images. So, yes, I could access that one.
But it is all kind of pointless, because we CAN paste here directly and there is no reason at all to user external sites for such things.It’s really not the problem to paste a picture instead of posting a hyperlink. Sure if that’s “the standard” on this forum I’ll do it. Not a big deal anyway.
But I’m curious about the reasons imgBB or imgur are advised not to be used. This is the first time I ever heard of that and I’d like to know the reasoning behind it.
-
@Ekopalypse Hi, first thanks for the comment.
I understand you have Npp installed and so I assume your configuration directory is the one in APPDATA, could that be?
No I don’t have a Configuration directory in %Appdata%/Notepad++ (neither in the parent directory, that is only %Appdata%)
If not, can you paste your debug information, which is available from the last menu item (the ? menu)?
I sure can. Here it is:
Notepad++ v8.4.4 (64-bit) Build time : Jul 15 2022 - 17:54:42 Path : C:\Program Files\Notepad++\notepad++.exe Command Line : "C:\Users\krete\Desktop\Alat\Filozof\New Text Document.txt" Admin mode : OFF Local Conf mode : OFF Cloud Config : OFF OS Name : Windows 10 Pro (64-bit) OS Version : 21H2 OS Build : 19044.2006 Current ANSI codepage : 1252
(Don’t know why there is such a big gap below the picture. I’ve tried to Edit, but I cannot make it shorter for some reason. Sorry)
-
@PeterJones Thanks for the comment.
I know this is going back to the beginning, but I’ve been away for a few days.
No, it’s fine, I’m happy people are eager to help. I appreciate that.
Settings > Preferences > Margins/Border/Edge >Padding > Distraction Free is at 9 (the widest)
I have tried every number from 3 to 9. Every number from 4 onwards is way too wide, while 3 was way to narrow. It’s 63 characters wide.
Aah %Appdata%/Notepad++/plugins/PythonScript/scripts
I was looking for a config directory into %Appdata% itself.
Anyway, the folder %Appdata%/Notepad++/plugins/PythonScript/scripts is empty.
And here is my Debug Info:
Notepad++ v8.4.4 (64-bit) Build time : Jul 15 2022 - 17:54:42 Path : C:\Program Files\Notepad++\notepad++.exe Command Line : "C:\Users\krete\Desktop\Alat\Filozof\New Text Document.txt" Admin mode : OFF Local Conf mode : OFF Cloud Config : OFF OS Name : Windows 10 Pro (64-bit) OS Version : 21H2 OS Build : 19044.2006 Current ANSI codepage : 1252 Plugins : mimeTools (2.8) NppConverter (4.4) NppExport (0.4) PythonScript (2)
Thanks for your comment.
-
@Neko-Nekokovic said in Problem with Margins in PythonScript Plugin and Margins in Distraction Free mode:
And where are you employed?
Irrelevant. My employer blocks imgBB as well.
Why would you want to keep someone from using imgBB or Imgur?
Alan didn’t say he wanted to. Alan said his employer blocked the site. And “why” a particular corporation’s IT department blocks something is rather irrelevant to the conversation. The fact is, they do – and many do. (My guess is that image-only sites are blocked because they aren’t often relevant to an employee’s job, and they often contain NSFW pictures, which one shouldn’t be perusing on the company’s dime. I’ve always been surprised that mine allows imgur, to be honest.)
No I don’t have a Configuration directory in %Appdata%/Notepad++
That’s because
%AppData%\notepad++
is the configuration directory; there isn’t one called “configuration” in there.4 onwards is way too wide, while 3 was way to narrow
Okay. That is, of course, a personal preference. (i don’t see a significant difference between 3 and 4, so it’s strange that one is way too wide and the other way too narrow. But to each their own.)
%Appdata%/Notepad++/plugins/PythonScript/scripts
That’s not what I said:
%AppData%\Notepad++\plugins\config\PythonScript\scripts
But if it’s empty, that just means you don’t have any user scripts yet. That’s where user scripts go, whether or not you currently have any. Once you put one in there, then you will have a user script.
Good luck
-
My guess is that image-only sites are blocked because they aren’t often relevant to an employee’s job, and they often contain NSFW pictures
NSFW part makes sense but it’s still a bit strange to me. I hope someone will explain it to me since this is the very first time I’ve heard about such a practice.
That’s because %AppData%\notepad++ is the configuration directory; there isn’t one called “configuration” in there.
Ah, okay. Thanks.
(i don’t see a significant difference between 3 and 4, so it’s strange that one is way too wide and the other way too narrow. But to each their own
Yeah it is strange indeed. 3 is 63 characters wide, while 4 is 97. Maybe that has to do with my weird resolution. That’s why I’m asking for a manual configuration of margin width, I guess I have to try it out manually and see how it appears.
That’s not what I said: %AppData%\Notepad++\plugins\config\PythonScript\scripts
You’re correct, I misstyped. I omitted the “config” directory. Anyway that directory is empty.
I will try to put Python user Script there and hope it will work.
Thanks.