feature request - word wrap per tab



  • 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.



  • That’s a great idea. See these instructions for submitting a feature request in an area that the developer will actually see it.



  • @Clyfton-In

    You can achieve your desired functionality right now if you don’t mind a bit of hacking. See this thread: https://notepad-plus-plus.org/community/topic/10985/file-specific-word-wrap-vs-global-enable



  • Ok, it’s been 7 months since I took the advice to put my suggestion in the feature request area, so the developers are obviously not interested, which is a shame since I think a global word wrap on an editor capable of multiple tabs is not very useful. I mean, who wants to word wrap every tab? I doubt anybody does. There could be programs in tabs and notes and documents and all sorts of stuff (like I do). Anyway, maybe this will generate some interest and someone can post instructions on how to do it myself. The instructions previously posted by Alan Kilborn were too complicated. I tried but there were too many steps left out that apparently everyone but me knows how to do.



  • @Clyfton-In

    Ok, it’s been 7 months since I took the advice to put my suggestion in the feature request area, so the developers are obviously not interested,

    Or just busy doing other stuff

    Anyway, maybe this will generate some interest and someone can post instructions on how to do it myself

    In order to be able to use a python script the first thing you need to do is to download and
    install the python script plugin.
    How to do this depends on which version of npp you are using.

    Then use the python script plugin menu to create a new script.
    Give it a meaningful name and paste the code into it, save it,
    Goto the python script plugin menu and you should see the newly created script.
    Click on it and set thw word wrap. Change to a different tab and you should see that this tab
    is not word wrapped but if you go back to the one you set it, it should still be word wrap.



  • @Clyfton-In said:

    Ok, it’s been 7 months since I took the advice to put my suggestion in the feature request area, so the developers are obviously not interested

    Proper protocol might have been to provide a link to that feature request here in this thread. Maybe this is it? https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5232

    Developers on Notepad++ work for free in their spare time; sometimes it is difficult to get features added. It takes about 5 seconds for one to request “word wrap on a per tab basis”, but it is a much bigger effort to realize it in code.

    The instructions previously posted by Alan Kilborn were too complicated. I tried but there were too many steps left out

    Well…the proper approach to that would have been to say “I got to step 7 and something odd happened and here’s what it was…”. Then someone here would have jumped in and helped you get around that. If you then encountered another problem, same thing… Iterate until successful conclusion reached. You chose to do the easier “WAAAAH WAAH IT DOESN’T WORK”, which IS easier, but doesn’t allow anyone a realistic chance at helping you make it work. Sigh.

    @Ekopalypse said:

    install the python script plugin. How to do this depends on which version of npp you are using.

    Sadly, this is probably the hardest part of making things work. Pythonscript is in a “bad place” right now, with the changes to how plugins work that came about with Plugins Admin. Anyway, maybe the best instructions for installing PS are here currently?: 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

    @Ekopalypse , did you actually try to get the word-wrap-per-tab script running on your system? I’ve had it running on my setup for a long time, and I have it assigned to shift+ctrl+w (which toggles wrap on/off for the active editor tab). It would be ctrl+w except I have that tied to something which selects the word the caret is on. :)



  • @Ekopalypse

    Upvote but no answer to “@Ekopalypse , did you actually try to get the word-wrap-per-tab script running on your system?”?



  • @Alan-Kilborn

    No, I don’t use it.
    I have ALT+S bound to

    current_editor = eval('editor{}'.format(notepad.getCurrentView()+1))
    current_editor.setViewWS(not current_editor.getViewWS())
    current_editor.setViewEOL(not current_editor.getViewEOL())
    

    which basically toggles the WS and EOLs of the current view. :-)



  • @Alan-Kilborn

    tststs Alan, you are too impatience :-D



  • @Ekopalypse said:

    Alan, you are too impatience

    Maybe…just didn’t want you to forget. Thought a second person actually trying it might uncover a stopper in the process that would have caused the OP to throw up hands.

    I have ALT+S bound to

    Is this related to what we’re talking about here?

    current_editor = eval(‘editor{}’.format(notepad.getCurrentView()+1))

    Why not this instead of your code?:

    editor.setViewWS(editor.getViewWS())



  • @Alan-Kilborn

    Is this related to what we’re talking about here?

    No, just mentioned that I’m using something similar but also very different.

    Why not this instead of your code?:

    Because this was one of my first scripts I copied from somewhere and it did what it should and I never thought about it anymore and even today I didn’t think about but you are right, editor.setViewWS(not editor.getViewWS()) is the proper solution if you want to toggle.
    :-D
    You see, once something runs, I forget about it until something happens which might
    force me to reconsider what I’ve done previously. :-D



  • I’m considering going down the hacking path mentioned previously. I remember it being long and arduous and fraught with peril. I looked at the recommended python plugin above … seems like a specific version of python for specific versions of Notepad++. So if Notepad++ gets updated, is everything going to break?



  • @Clyfton-In said:

    hacking path

    LOL. Scripting plugins exist so one can add functionality. It’s only a hack if consider it a last resort. Which you do, so hack it is. :)

    seems like a specific version of python for specific versions of Notepad++

    Hmmm, not sure what this means…

    So if Notepad++ gets updated, is everything going to break?

    In general, no. But sometimes big changes have to be made in software for it to evolve. Recently we’ve seen some of these types of changes in Notepad++ and some of the plugins have lagged.



  • I only said hacking cause you said hacking 7 months ago:
    You can achieve your desired functionality right now if you don’t mind a bit of hacking.

    When I said … seems like a specific version of python for specific version of Notepad++ … it’s because the link you provided 3 days ago says this …

    for notepad++ 7.6.4, 64 bit (installed version):
    download and extract PythonScript_Full_1.3.0.0_x64.zip from >>> here <<< to your desktop.
    note: do not use any other available release type, except this zip.

    So if doing all the work to get a wrap toggle could just break in the next notepad++ update, no sense in pursuing.



  • @Clyfton-In said:

    I only said hacking cause you said hacking 7 months ago

    Haha. So I did. Maybe my views on hacking versus “endorsed solutions for augmentation” have slightly changed. :)

    no sense in pursuing

    Yea, probably that’s true.

    I guess I retract my advice.


Log in to reply