-
Notifications
You must be signed in to change notification settings - Fork 4.6k
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request - word wrap per tab #5232
Comments
A great way to implement this would be to add a section of 3 settings to the right-click menu of a tab:USE GLOBAL SETTING
|
It's a feature that makes sense. Not sure of the disposition of Notepad++ developers to add it, but it is possible to write a script to implement the behavior. See these links for inspiration: https://notepad-plus-plus.org/community/topic/10985/file-specific-word-wrap-vs-global-enable |
Thanks. But I saw those links previously and they were over my head to implement :( |
@Clyfton There are a lot of Pythonscript installation instructions on that same forum; seems pointless to re-spoon-feed here. Maybe see https://notepad-plus-plus.org/community/topic/17256/guide-how-to-install-the-pythonscript-plugin-on-notepad-7-6-3-7-6-4-and-above and/or https://notepad-plus-plus.org/community/topic/16942/pythonscript-any-ready-pyscript-to-replace-one-huge-set-of-regex-phrases-with-others/ |
I followed the instructions. Then I created WordWrapPerTab.py file and pasted in the script. It now appears as a Python script, but when I click on it, I get: |
I strongly support this feature request. My previous favorite text editor, ConTEXT, had this feature built in. Surprised more people aren't calling for this - doesn't everyone work with numerous large files, some files requiring word wrapping and other files not? |
Sad but true ... none of the programmers and plugin developers notice the missing feature, and the few instructions laying around the internet are outdated and incomplete. |
+1 for me too. It seems to be something that I thought was already there, but recent experience with a variety of files in use daily makes having to go back and forth annoying. In the meantime maybe an Autohotkey macro might do it. |
Similar to #3839. |
+1 here as well. I do a lot of coding in Notepad++ and sometimes I don't want the text to wrap for a certain tab but to remain wrapped in all the other tabs. |
I was just preparing to make a similar request, but I came across this one for per-tab wrapping. This would solve my issue with the relatively minor hassle of having to set it each time I opened a file. Here's what I would add. I'd be delighted to have word-wrap per lanugage. The reasoning is that most of the time I don't want word wrap; it makes code hard to read. However, certain types of files shouldn't use |
boggles the mind this hasn't been implemented yet. very annoying constantly switching the global setting when switching to certain tabs where it matters. probably cliché to say this, but this is one of those features that would make me donate lol. |
Sure.
Also very true. A WORKAROUND technique has been known for roughly 7 years and was referenced earlier in this thread. Recently I've "freshened" the workaround and those efforts may be found HERE. At this juncture, there are two choices: use the workaround, or continue to suffer. |
@alankilborn |
If THAT'S the suggested path, that solves maybe 90% of open issues. :-) |
The suggested feature should have been part of Notepad++ from day one. |
Desperately need this. I wish I had a nickel for every time I turned word wrap on or off. |
Use the script referenced here: #5232 (comment) |
I got the script to work when I run it from the Plugins menu. But I can't get the command to show up in the right-click Context Menu. I edited ContextMenu.xml and added this: I saved the .XML file and exited out of Notepad++, then restarted. Do not see the entry in the right-click Context menu. What am I missing? |
I don't know, I think you left something out of your post: |
Oh, sorry, I didn't realize what I pasted in didn't appear: |
@mekelton Does the script appear exactly here, in the FIRST submenu of the PythonScript plugin? If not then I think you missed this step in the setup: https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript#:~:text=Click%20the%20left%20Add%20to%20add%20the%20script%20to%20the%20Menu%20items%20table |
I did miss that part. It is working now. Thanks very much! |
I didn't read anything above, but want to immediately add my PLUS 1 to this request!! I have had this in TextPad forever and it is SOOOO useful!! Now I will read the posts, and see if I can provide an additional useful posting based on what I find. |
THIS!!! |
A) Why would you mention something that was already recommended AND which the OP stated completely flumuxed him/her?!? B) What you suggest is also only one step removed from telling a user of Microsoft Excel to stop whining, learn how to program, and then hack a patch to the application to get what you want. C) Oh, did you get the part there about needing to learn how to program FIRST?? D) How about another angle: are you recommending that a user COPIES CODE OFF OF THE INTERNET and then just runs it on their computer?!?!? Even if the user was competent in the language, which is not the case here, they could still get screwed by doing this if they miss something in their review of said code. Very misguided recommendation here, and poor taste too, IMHO. |
THIS ALSO! |
I assume that you are not expressing sarcasm here, due to the lack of an emoji. If you were, good one! If not, I reference you to my prior post quoting a similar response . . . but yours is far worse. |
I don't see this as a problem. First off, NPP was NOT named DevPad++, it was named Notepad++. I don't know if NPP was originally written SPECIFICALLY as a developer tool, or if it was written as a more general text editor. Given the riff on Microsoft's product name, I strongly suspect the latter. Regardless, NPP should strive to provide what anyone who decides to use it would absolutely expect from it - modern text creation/editing features (and a LOT of people are drawn to the product due to its wonderful reviews online). And wrapping-per-document is clearly one of those features. |
I posted my subsequent comments partly the hopes of helping some people be better at responding to GitHub Issue postings. But the main issue was to hopefully get this feature to percolate up to the "let's add it now" que. As a final push for this, I note that this particular feature request has been on the books since at LEAST Jan 29, 2016: #1427. And that Issue Request was closed, improperly I think, simply because the poster wasn't using the latest NPP build. So we are talking at least EIGHT YEARS that this has been asked for. |
I would have to dig to find the reference (somewhere in some recent RTL-per-tab issue comments), but N++ author feels that word-wrap-per-tab would introduce some unacceptable performance penalties, so it won't be considered for implementation. |
Strange that NOT doing extra work (i.e. word wrapping) for EVERY tab causes a performance penalty. It must take a whole lot of work to NOT do something in N++! I really, REALLY wish this existed in the base product. To me, the whole point of multiple tabs is that I can have multiple documents, almost always a mix of general text, source code and configuration files -- but only the general text benefits from word wrap. With 5GHz, 24 core CPUs these days, I think I can afford the performance penalty! |
Well said! I couldn't agree more. There have been 10,000 fixes to problems I've never had and no interest in the biggest omission. |
I added the PythonScript plugin and your WordWrapToggleForActiveTabWithPersistence script. It works great, and I really appreciate it. Any possibility the script could also toggle N++'s built-in word-wrap icon in the toolbar somehow? (I suppose I could install the Customize Toolbar plugin.) P.S. Your suggested keyboard shortcut of Ctrl+Alt+W is similar to the pre-defined Ctrl+Shift+W keyboard shortcut for close all windows. I did that by accident the first time I tried it. Oops. |
The workaround won't help me. I keep around 30 text files open all the time. I need a way to turn word wrap on for one or two of them (different ones each time), not all of them. |
I think you're confused. The workaround script allows independent control. |
Scripts don't have easy access to the toolbar icons. What I do if I am unsure of the wrap status for the active tab is to toggle it and then I see the status in the N++ status bar area. If it goes to the state I don't want by doing that, I simply toggle it again. (Note: not sure if the script you have is one that writes status to N++ status bar?)
That plugin has known problems.
I tried to suggest something unassigned, for simplicity. What I actually have for myself is Ctrl+w assigned to it (I unassign the default N++ Ctrl+w from close-tab). |
You are probably right. |
@nathanm |
I usually have many documents open of many types with only one or two I want to have word wrap. It would be great to have word wrap as a tab-right-click option so that word wrap only applies to that tab and not any of the others. The global word-wrap option can still remain for those who want that.
The text was updated successfully, but these errors were encountered: