I want to insert a text (say "123") in all lines after column 7 and before column 8.
When I try to setup anvertical insert line between columns 7 and 8 it does not work. Either column 7 or 8 is marked at least.
But if I mark e.g. column 8 and I type the first char I want to insert ("1")
then all existing col 8 chars are overwritten.
But I don't want to overwrite - only insert.
Does this work somehow otherwise?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You have to make a column selection of 0 character and do what you want. There will be no cursor to materialised your 0 character selection but it will be working fine
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This has come up before. I guess people assume they can't have a zero width column because it becomes invisible at that width. Don, is it possible to make it visible somehow?
zero width column selection should be possible. Take a look at Ultraedit, only a 1px line, but iw works great.
Another great feature of Ulraedit or Textpad which I would love to see in my (new) favourite editor NPP: explizit column editing mode switch mode/button.
Reason: imagine the following: I have a long text file of which I want to remove some columns (really happens once in a while). When using one of those editors, I only have to switch to column editing, and mark the area using the ctrl-shift-end keyboard operation -> finished.
When using NPP, I am only able to do this per mouse because being forced to additionally hold the alt-key breaks the ctrl-shift shortcut. Another great benefit for this mode in NPP would be the ability to be able to change the behaviour of the ctrl-pos1 ctrl-end shortcut from e.g.: "jump to the end of file" to "jump to the same column in the last line".
I do not intend to suggest giving up the fast and easy alt-column-selection, but only in adding one more button/mode similar to the "show invisible chars"-mode. What do you think of it?
BTW: Thanks for this already great editor! :))
Best regards, Ralph Gutmann.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When having selected multiple columns, stroking keys result into changing all chars to the same new value. That's fine.
But what should be the correct behaviour when an empty column is selected? Ultraedit's answer: column inserts! (One new column per keystroke, selection is still there an moves with each new character column) This is ingeniuos and the only resonable thing to do, isn't it?
Best regards again, Ralph.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Meanwhile, you could use a regular expression to achieve your goal.
Move the cursor to the top of the file (CTRL+Home).
Use the CTRL+R Find/Replace Dialog.
In the Find field, enter the regular expression below. It searches for any line with at least seven characters.
^(.......)
In the Replace field, enter:
\1123
This replaces the seven characters by itself (\1) and adds the string 123 to them.
Check the regular expression checkbox, uncheck any other checkbox.
Press the Find button.
Press the Replace Rest button.
Note: you should not have tab characters in the first seven characters position of any line, but I assume this isn't the case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to insert a text (say "123") in all lines after column 7 and before column 8.
When I try to setup anvertical insert line between columns 7 and 8 it does not work. Either column 7 or 8 is marked at least.
But if I mark e.g. column 8 and I type the first char I want to insert ("1")
then all existing col 8 chars are overwritten.
But I don't want to overwrite - only insert.
Does this work somehow otherwise?
Hi
You have to make a column selection of 0 character and do what you want. There will be no cursor to materialised your 0 character selection but it will be working fine
This has come up before. I guess people assume they can't have a zero width column because it becomes invisible at that width. Don, is it possible to make it visible somehow?
I've added a note about zero width selections to the FAQ at http://notepad-plus.wiki.sourceforge.net/FAQ .
Hi,
zero width column selection should be possible. Take a look at Ultraedit, only a 1px line, but iw works great.
Another great feature of Ulraedit or Textpad which I would love to see in my (new) favourite editor NPP: explizit column editing mode switch mode/button.
Reason: imagine the following: I have a long text file of which I want to remove some columns (really happens once in a while). When using one of those editors, I only have to switch to column editing, and mark the area using the ctrl-shift-end keyboard operation -> finished.
When using NPP, I am only able to do this per mouse because being forced to additionally hold the alt-key breaks the ctrl-shift shortcut. Another great benefit for this mode in NPP would be the ability to be able to change the behaviour of the ctrl-pos1 ctrl-end shortcut from e.g.: "jump to the end of file" to "jump to the same column in the last line".
I do not intend to suggest giving up the fast and easy alt-column-selection, but only in adding one more button/mode similar to the "show invisible chars"-mode. What do you think of it?
BTW: Thanks for this already great editor! :))
Best regards, Ralph Gutmann.
Hi again,
oops, forgot one feature:
When having selected multiple columns, stroking keys result into changing all chars to the same new value. That's fine.
But what should be the correct behaviour when an empty column is selected? Ultraedit's answer: column inserts! (One new column per keystroke, selection is still there an moves with each new character column) This is ingeniuos and the only resonable thing to do, isn't it?
Best regards again, Ralph.
AFAIK there's no way to make it visible. Or you have to modify the source code of Scintilla.
Make a note in wiki section is a good idea.
Don
Crimson Editor (http://www.crimsoneditor.com/)
can do this as well.
Source Code for Crimson is free available
Meanwhile, you could use a regular expression to achieve your goal.
Move the cursor to the top of the file (CTRL+Home).
Use the CTRL+R Find/Replace Dialog.
In the Find field, enter the regular expression below. It searches for any line with at least seven characters.
^(.......)
In the Replace field, enter:
\1123
This replaces the seven characters by itself (\1) and adds the string 123 to them.
Check the regular expression checkbox, uncheck any other checkbox.
Press the Find button.
Press the Replace Rest button.
Note: you should not have tab characters in the first seven characters position of any line, but I assume this isn't the case.
If you want to apply ALL the lines, no need to select.
Just put your caret in position then launch Column mode editor.
Don