Hi,
I am forget how to add same text at the end of lines.
For example
aaa
bbb
ccc
ddd
became
aaaZZ
bbbZZ
cccZZ
dddZZZ
Regards
Phil
"Search and Replace" with a regular expression (regexp) seems appropriate
On Sat, Jun 29, 2013 at 9:03 AM, Philippe Couas pcouas@orange.fr wrote:
Hi,
I am forget how to add same text at the end of lines.
For example
aaa
bbb
ccc
ddd
became
aaaZZ
bbbZZ
cccZZ
dddZZZ
Regards
Phil
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
For example, turn on reg exp search:
search: ^(.+)$ replace: \1XX
will do it.
On 29 June 2013 09:20, Eric Crastes eric.crastes@gmail.com wrote:
"Search and Replace" with a regular expression (regexp) seems appropriate
On Sat, Jun 29, 2013 at 9:03 AM, Philippe Couas pcouas@orange.fr wrote:
Hi,
I am forget how to add same text at the end of lines.
For example
aaa
bbb
ccc
ddd
became
aaaZZ
bbbZZ
cccZZ
dddZZZ
Regards
Phil
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
The regular expression is probably the best solution, but I would like to add this one, in case it is more appropriate for what you are doing, and also because it is easier to use for people that do not know regexp.
If all lines have the same length (same amount of text), you could use the "Column Mode" from the "Extra Selection" plugin. You position the cursor at the end of the first line, enable the "Column Mode" from the "Tools > Extra Selection" menu, then you press Shift and arrow down which make the cursor goes multiple lines: (I use the character "|" to represent the text cursor) aaa| bbb ccc ddd
Shirt + Arrow down 3 times: aaa| bbb| ccc| ddd|
Then you type your text "ZZ" and it appear at the end of every selected lines: aaaZZ| bbbZZ| cccZZ| dddZZ|
Don't forget to disable the "Column Mode" when you are done. It can be quite annoying when you don't need it :)
Gael
On 29/06/13 17:03, Philippe Couas wrote:
Hi,
I am forget how to add same text at the end of lines.
For example
aaa
bbb
ccc
ddd
became
aaaZZ
bbbZZ
cccZZ
dddZZZ
Regards
Phil
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Le 01/07/2013 11:20, Gael Lafond a écrit :
The regular expression is probably the best solution, but I would like to add this one, in case it is more appropriate for what you are doing, and also because it is easier to use for people that do not know regexp.
If all lines have the same length (same amount of text), you could use the "Column Mode" from the "Extra Selection" plugin.
You don't need the plugin to use rectangular selections, it IIUC only provides a few extras. By default to create a rectangular selection, place the cursor on one of its corner, and use Alt+Shift+<arrow> to expand it in any direction.
Regards, Colomban
On 1 July 2013 23:13, Colomban Wendling lists.ban@herbesfolles.org wrote:
Le 01/07/2013 11:20, Gael Lafond a écrit :
The regular expression is probably the best solution, but I would like to add this one, in case it is more appropriate for what you are doing, and also because it is easier to use for people that do not know regexp.
If all lines have the same length (same amount of text), you could use the "Column Mode" from the "Extra Selection" plugin.
You don't need the plugin to use rectangular selections, it IIUC only provides a few extras. By default to create a rectangular selection, place the cursor on one of its corner, and use Alt+Shift+<arrow> to expand it in any direction.
Or place the cursor at one corner and <ctrl>+<shift>+click at the diagonally opposite one.
Cheers Lex
Regards, Colomban _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users