Author Topic: Simultaneous rename  (Read 176 times)

Offline Alfred96

  • Single posting newcomer
  • *
  • Posts: 4
Simultaneous rename
« on: October 09, 2018, 08:37:17 am »
If I have something like:
Code: [Select]
template<class Int_T,class Int_Y>
auto operator+(const Int<Int_T>& left, const Int<Int_Y>& right)
->Int<typename if_<!std::is_same<Int<Int_T>,Int<Int_Y>>::value,
                   Choose_Larger<Int<Int_T>,Int<Int_Y>>,
                   Promote<Int<Int_T>>
                  >::type
     >
{
    return add(left,right);
}
And I decided that for clarity I would like to change Int_T to simply A and Int_Y to just B I see that at the moment those references are being "highligted" but I don't think I can do anything with those multiple selections? Is there a way that I just select one (the other ones are get highlighted) and I change just this one I've selected and the other ones are get automatically changed?
Thanks.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11131
    • Travis build status
Re: Simultaneous rename
« Reply #1 on: October 09, 2018, 09:09:16 am »
If you have enabled editing in multiple selections (not enabled by default).
You can press ctrl-e (edit -> select next occurrence) multiple times to select them all and then you can just type your new name.

There is also an Edit -> Select all command, but this select every occurrence in the whole file.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 2024
Re: Simultaneous rename
« Reply #2 on: October 09, 2018, 09:41:00 am »
Why not search and replace all?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11131
    • Travis build status
Re: Simultaneous rename
« Reply #3 on: October 09, 2018, 10:52:17 am »
Because it will be slower :) And it might replace something you don't see.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]