Does NPP have selective box editing?
-
I’m trying to replace my text editor (Kedit). This old text editor (legacy mainframe editor was the Xedit) has selective editing. After several updates I’m wondering if NPP now has selective box editing.
I’m trying to import raw text data. I know npp can copy or move columnar data. But can I edit data in a box using npp (see below) ie. also fill a box with blank spaces or do calculations on a column of numbers. Thank you.
-
@bofhlusr said in Does NPP have selective box editing?:
I know npp can copy or move columnar data.
Yes
But can I edit data in a box using npp (see below)
Depends on what you mean… pasting sections of some other application’s user manual won’t be overly helpful, because we might not understand the context you are using them in.
ie. also fill a box with blank spaces
If you had a column selection of blank spaces the right size, you can paste over your new column selection. Or if you have N spaces copied, and have a column selection N wide and M tall, doing the paste will overwrite all M lines of the block with the clipboard; or if you had the NxM selected and then typed N spaces, it would replace those with N…
or do calculations on a column of numbers. Thank you.
Notepad++ search/replace doesn’t do math. See our Mathematical Replacement FAQ
—
update: Looking again at the screenshot (which I admit I didn’t read at first)
- DELETE A BLOCK = use the
DEL
orBACKSPACE
key - Upper/Lowercase = Edit > Convert Case To… works on column/block or on stream selections
- Shift left/right = depending on what is meant by shift, you can click-and-drag on the block after making the column selection to drag it left or right.
- fill a block = not without scripting, though I think doing it in PythonScript wouldn’t be too hard (never tried)
- overlay = copy the block then paste at new location (might need to do a block selection for the new location as well, depending on the exact situation)
- unmark a block = to exit column-selection mode, hit
ESC
- DELETE A BLOCK = use the
-
@PeterJones said in Does NPP have selective box editing?:
@bofhlusr said in Does NPP have selective box editing?:
I know npp can copy or move columnar data.
Yes
But can I edit data in a box using npp (see below)
Depends on what you mean… pasting sections of some other application’s user manual won’t be overly helpful, because we might not understand the context you are using them in.
ie. also fill a box with blank spaces
If you had a column selection of blank spaces the right size, you can paste over your new column selection. Or if you have N spaces copied, and have a column selection N wide and M tall, doing the paste will overwrite all M lines of the block with the clipboard; or if you had the NxM selected and then typed N spaces, it would replace those with N…
or do calculations on a column of numbers. Thank you.
Notepad++ search/replace doesn’t do math. See our Mathematical Replacement FAQ
—
update: Looking again at the screenshot (which I admit I didn’t read at first)
- DELETE A BLOCK = use the
DEL
orBACKSPACE
key - Upper/Lowercase = Edit > Convert Case To… works on column/block or on stream selections
- Shift left/right = depending on what is meant by shift, you can click-and-drag on the block after making the column selection to drag it left or right.
- fill a block = not without scripting, though I think doing it in PythonScript wouldn’t be too hard (never tried)
- overlay = copy the block then paste at new location (might need to do a block selection for the new location as well, depending on the exact situation)
- unmark a block = to exit column-selection mode, hit
ESC
Thank you. Hoping npp will be even better in the future than it already is. Very much appreciating npp now.
- DELETE A BLOCK = use the
-
@PeterJones said in Does NPP have selective box editing?:
fill a block = not without scripting, though I think doing it in PythonScript wouldn’t be too hard (never tried)
It’s deceptively easy…meaning not-so-easy.
Well, basic functionality is easy.
But covering all the cases, e.g., all selection types, support for virtual space, retaining line-endings instead of replacing them with the fill character…it adds up in complexity.
I’ve got a script that’s almost finished in this regard; it fills with the space character, but that’s easy to make programmable.
Famous last words: Let me finish it up and post it. :-) -
@Alan-Kilborn said in Does NPP have selective box editing?:
support for virtual space,
Just curious… what is “virtual space”?
-
@bofhlusr said in Does NPP have selective box editing?:
what is “virtual space”?
Have you read the USER MANUAL?
Try to avoid asking questions here that are already answered in the manual.(Of course, if the manual doesn’t make it clear, feel free to ask the questions here.)
-
@PeterJones said:
…you can click-and-drag on the block after making the column selection to drag it left or right.
This is interesting. If you drop (after dragging) to the right of end-of-line, spaces will be inserted on the left (after existing end-of-line) so that the column block you dropped will end up in the drop-point column. I never knew/tried this before.
-
@PeterJones said:
Shift (a block) left/right
Perhaps there’s a capability in the script in this recent thread that will help with this:
https://community.notepad-plus-plus.org/topic/26196/force-tab-one-space-indents-unindents -
@Alan-Kilborn said in Does NPP have selective box editing?:
@bofhlusr said in Does NPP have selective box editing?:
what is “virtual space”?
Have you read the USER MANUAL?
Try to avoid asking questions here that are already answered in the manual.(Of course, if the manual doesn’t make it clear, feel free to ask the questions here.)
You are correct. Thank you. I have not read the manual. I was hoping I didn’t have to. I should at least take a look at it.
Edit: I just did a quick search of “virtual space” and I still couldn’t find the definition in the link to the manual that you provided. Thank you again for that link. I still don’t know what virtual space is. The definition is probably in there somewhere. As I mentioned, I was just curious because I thought it was chr(32) or something like that. But I guess not. It’s ok. I don’t have to scratch that curiosity itch.
-
@bofhlusr said:
I have not read the manual. I was hoping I didn’t have to.
Well, you admitted you don’t know what a phrase (“virtual space”) means.
Notepad++ has a user manual where such things are defined.
So “hoping I didn’t have to” isn’t going to get you very far.
RTFM.I just did a quick search of “virtual space” and I still couldn’t find the definition in the link to the manual that you provided.
Please. We can’t teach such basic skills here.
Follow the link, the use the find feature (probably Ctrl+f) of your browser to look for the phrasevirtual space
.
The link I gave was to “top of section” for the area where virtual space is discussed.
Failing all else, just visually scan the manual downward from where the link takes you, until you find it. -
@Alan-Kilborn said in Does NPP have selective box editing?:
@bofhlusr said:
I have not read the manual. I was hoping I didn’t have to.
Well, you admitted you don’t know what a phrase (“virtual space”) means.
Notepad++ has a user manual where such things are defined.
So “hoping I didn’t have to” isn’t going to get you very far.
RTFM.I just did a quick search of “virtual space” and I still couldn’t find the definition in the link to the manual that you provided.
Please. We can’t teach such basic skills here.
Follow the link, the use the find feature (probably Ctrl+f) of your browser to look for the phrasevirtual space
.
The link I gave was to “top of section” for the area where virtual space is discussed.
Failing all else, just visually scan the manual downward from where the link takes you, until you find it.Using Edge, your link and pressing Ctrl+f several times gave me just this.
This is probably going off topic already. From an MSDOS perspective I was thinking of a LF/CR combination instead of a caret (ascii 094).
-
your link and pressing Ctrl+f several times gave me just this.
Yes, that is the definition of “virtual space” that @Alan-Kilborn was referring to.
The “caret” is the typing cursor character, not the ASCII 94. “Virtual Space” enables putting the typing cursor in the blank space beyond the end of the line, and if you start typing there, Notepad++ will automatically insert the spaces between the end of the line and where you started typing.
(I shouldn’t need to define “caret” every time it’s used in the User Manual: it’s used consistently throughout the whole manual, and has been part of DOS and Windows nomenclature for the typing cursor in text editors since the 80s, and probably even in earlier pre-DOS text editors.)
-
Is it worth some additional text in the manual, e.g. …
Normally the caret is confined to positions on its line to the left of the line-ending character(s) [side note: not sure even if line-ending stuff is defined adequately in the manual]. When virtual space is enabled, the caret is freed from its confinement and can be placed to the right of line-endings. This has no real effect unless it is followed by the typing of some character, at which point the virtual space is filled with actual space characters to the left of the caret, to fill from the existing line entry to the column of the caret. The new line-ending is then placed to the right of the character entered.
…or…some…such. :-)
I mean, well, I’m clear on the virtual space concept, but new users might not be, so maybe more treatment in the manual is justified.