Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: photon3108 on July 05, 2013, 10:59:06 am

Title: [Find HotKey] Select one by one and replace all, but not ctrl+r
Post by: photon3108 on July 05, 2013, 10:59:06 am
Line Text
  10 dabc
  11 eabc
  12 fabc
  13 gabc

I can select "abc" only in line 11, 12, one by one. And then I remember I have to press
some keys and type somethings what I want to replace immediately.

This hotkey, not ctrl+r, is really cool. But I forget what the hotkey is. Does anyone know that?
Title: Re: [Find HotKey] Select one by one and replace all, but not ctrl+r
Post by: Jenna on July 05, 2013, 12:34:19 pm
I'm not sure what your try to do.

But to edit both lines together you can do a block-select (select a block of text with pressed ALT-key) and type the new text, it will appear in all selected lines.

Or to edit multiple places, that can not be selected by block-select, you can enable multiple selection and typing/deleting in "Settings -> Editor -> Margins and caret --< Selections".
If this is elected you can place the caret on multiple places by pressing CTRL and click all the places where a caret should appear.
Title: Re: [Find HotKey] Select one by one and replace all, but not ctrl+r
Post by: photon3108 on July 05, 2013, 12:59:01 pm
You are so great! That is almost what I want.
But, is there any hotkey with up/down key, not mouse click, to select same text?

[For example]:
Line Text
  10 DDabc
  11 Eabc
  12 ___FFFabc
  13 GGabc

I want to select "abc" in line 11, 12 but I can't use block-select. I can not
use mouse click because it may have 30 "abc" or more. If there is a hotkey
with up/down key, it will save some time.
Title: Re: [Find HotKey] Select one by one and replace all, but not ctrl+r
Post by: dmoore on July 05, 2013, 03:47:57 pm
Find again? F3/shift F3
Title: Re: [Find HotKey] Select one by one and replace all, but not ctrl+r
Post by: photon3108 on July 05, 2013, 04:02:01 pm
How to select multiple "abc" by F3/Shift F3?
I want to select "abc" in line 11 and line 12, but neither ctrl+r nor mouse click. And then replace them with "def".