A few yes or no questions about Np++



  • Considering to use Np++ as my default text editor in Windows, which raised the following questions.

    Can the user set Np++ line wrap column width?
    Can Np++ perform the following,

    block search
    block sort
    block copy
    block cut
    block paste alongside another block while retaining the integrity of both blocks?



  • @I-neuw ,

    Can the user set Np++ line wrap column width?

    Probably not in the way that you want. When you type beyond the last displayed column, if you have View > Word Wrap enabled, it will visually wrap to another “line” of text, but it will not insert the true line ending characters, so the file itself still has only one line for that text. Further, as my wording implied, it was accomplished by changing the window width, which probably isn’t what you want. However, before you immediately dismiss Notepad++ because of the lack of this feature, you should know that one of the best things about Notepad++ is its extensibility: it has a full plugin interface, and there is likely a plugin that could accomplish that for you (another forum member will have to chime in if they know of one); if there isn’t, you can use a plugin like PythonScript to code up the behavior that you want (and forum members will often help with the PythonScript coding, especially if you show some effort to begin with)

    For the next questions, I am assuming that by “block ___”, you mean what Notepad++ calls “column mode”, or what other programs might call a “rectangular selection” as opposed to standard selections which grab the whole line if multiple lines are selected…

    693f9e15-a127-4a53-840f-17b43b359851-image.png

    block search

    block sort

    Not really. Notepad++ can search inside the active selection, but that appears not to work with a column-mode selection.

    I vaguely remember that there may have been PythonScript solutions shown previously in the forum for how to search inside a column-mode or multiple/disjoint-selection text.

    block copy
    block cut
    block paste alongside another block while retaining the integrity of both blocks?

    These three are handled natively. Hold down the Alt key while selecting your text to make the column-mode selection. Then ^C/^X/^V will do what seems reasonable: if you start with

    This is some text 
    This is some text
    This is some text
    

    and column-mode select all the is some and copy, then move one space beyond the first text and ^V, it will end up with

    This is some text is some
    This is some text is some
    This is some text is some
    

    If you paste again, this time before the first This, you will end up with

    is someThis is some text is some
    is someThis is some text is some
    is someThis is some text is some
    

    If you made a new column-mode selection in there and pasted over it, it would paste over the block.



  • @PeterJones can’t thank you enough for the time you took to compose such a detailed response. This pretty much covers my concerns, and I am sure that the solution for my word wrap is out there. I use word wrapping for plain text composition, like articles, etc. So it’s no a big deal. It’s just easier to follow what I write.

    Column/block features are used for editing Wikisource/Wikipedia OCR generated text to cleanup and separate collapsed columns.

    The questions were based on the features used in TextPad. Thanks again.



  • block sort

    Block sort is a problematic concept for the general case.
    Why?
    Because a block doesn’t always have a regular amount of characters in its width, like the nice, regular one Peter shows above.
    You could have a block selection like this:

    710e90d1-c413-4243-bf64-f2f11e9690af-image.png

    Where line 17 is an empty line.
    Not sure what a block sort should do to this type of situation.



  • @I-neuw said in A few yes or no questions about Np++:

    block search
    block sort
    block copy
    block cut

    But, if we are considering the normal stream block here, instead of the aforementioned column block, then YES, all 4 of these operations are supported.


Log in to reply