Wrap at column 72 as i am typing



  • So i would like notepad++ to simply move the cursor to say column 8 once i have gone past column 72.
    So as i type a character that would move the cursor beyond column 72 it moves that character to column 8
    and continues typing from there.

    Is that at all possible?

    Thanks for your help.



  • @Anthony-Blinco

    Is that at all possible?

    Not totally/strictly.

    Notepad++ has a “wrap” feature, but it is based upon window size.
    So…if you sized your window such that column 72 data shows at the very right edge, you’d get what you want.
    However, that effect is only visual, i.e., it doesn’t change your data.

    If you want your data to really be limited to 72 columns, you could use the Split Lines command, but you’d have to have your window sized as above, or use the Vertical Edge feature.

    We can provide more details, but will wait until you tell us which direction you would like to go in.



  • Thank you Alan.
    If you want your data to really be limited to 72 columns
    This is the case. I need it to create a new line and continue editing at about column 13

    To elaborate on my situation, i am implementing an editing system for very old COBOL.
    Originally in cobol the layout is thus;
    Columns Description
    1-6______ line numbers
    7________ comment/continuation/debug
    8-12____ Area-A
    13-72___ Area-B
    73-80___ Modification code

    So i should only be able to edit columns 7 through 72
    Columns 73-80 should idealy be modified by the editor to record user/date modified

    I guess i’m asking if there is a way i can get into the nitty gritty of notepad++ and modify the behaviour of the editing.
    I’m happy to code something if that’s possible



  • @Anthony-Blinco said in Wrap at column 72 as i am typing:

    only be able to edit columns 7 through 72

    I actually did some COBOL back in the 1980’s, so I know something of this. :-)
    But I’d rather forget. :-)

    Actually, I don’t know of a plugin that would allow this behavior, but it would not terribly surprise me if there were one.

    is a way i can get into the nitty gritty of notepad++ and modify the behaviour

    Well, of course you can, if you are brave enough to try.
    Notepad++ is open-source software, so everything is available.
    However, editing functions are the purview of Scintilla, not Notepad++ itself, so you’d probably need to get into the Scintilla code.
    That code is available as well.
    Good luck.



  • @Anthony-Blinco ,

    As a solution rather specific to COBOL, hat sounds like an ideal task for a plugin. If one doesn’t exist (check Plugins Admin; I am on a phone, so cannot easily check, but don’t think I’ve seen one), then I think writing a plugin would be better than editing the main app codebase. Since you seem willing to code, I think plugin is the way you should go.



  • Is there any documentation/examples for developing plugins?



  • @Anthony-Blinco ,

    The Notepad++ Plugin Communication doc describes the message and notification interface with the Notepad++ app itself, which plugins use to control and get info from the GUI/environment, and the Scintilla docs describe the messages and notifications that are used when controlling the editor components of Notepad++. And the author of Notepad++ has a collection of plugin source code, with repos for the plugin template and plugin demo, plus the code that is used for the MIME tools and Npp Converter plugins that are distributed with Notepad++.



  • Maybe also worth mentioning is the cookie cutter plugin template thingy: https://community.notepad-plus-plus.org/topic/17787/a-new-c-plugin-template
    Maybe in one of the resources Peter linked; I didn’t check.



  • @Anthony-Blinco said in Wrap at column 72 as i am typing:

    Is there any documentation/examples for developing plugins?

    I should mention I know very little C/C++, I can basically write “hello world” without any assistance; beyond that I’m a copy/paste programmer. With the resources that @PeterJones and @Alan-Kilborn listed above I was able to write a few simple Notepad++ plugins and take some really functional Notepad++ plugins (most of which seemed abandoned by authors) and modify them to fix bugs, add functionality and make 64-bit compatible.

    I say this because there is no step-by-step resource I’ve found. I had to do a lot of reading / Google-ing / experimenting etc., but the above was more than enough to get me - a non-expert C/C++ coder - going.

    Cheers.



  • That is super helpful. Thanks you guys so much!!


Log in to reply