Home Download Buy Blog Forum Support

Renaming in Sublime Text

Renaming in Sublime Text

Postby arnsa on Sun Nov 11, 2012 1:40 pm

Hello, I would love someone to create or tell me if there's one plugin for at least C language, which could rename all the variables, functions etc. in the code when I'm changing one. For example:

int a;
...some code...
if(a > something)
a = something;
...some code...

So if I change a to for example b, a should change to b all over the code. It's possible to do it with CTRL+D or Alt+F3 but that's very inconvenient, because if you've got for example 2 variables:

char a, ab;

And if you want to change only a, Alt+F3 would change ab also.
arnsa
 
Posts: 2
Joined: Sun Nov 11, 2012 1:36 pm

Re: Renaming in Sublime Text

Postby C0D312 on Mon Nov 12, 2012 2:27 am

If you don't have anything selected when you press control+D, it should select the variable and any subsequent presses of control+d will only select exact matches. So a will match but ab won't. This behavior is different if you have something initially selected prior to pressing control+D, which will select subwords as well.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Renaming in Sublime Text

Postby arnsa on Mon Nov 12, 2012 9:35 am

C0D312 wrote:If you don't have anything selected when you press control+D, it should select the variable and any subsequent presses of control+d will only select exact matches. So a will match but ab won't. This behavior is different if you have something initially selected prior to pressing control+D, which will select subwords as well.


Oh, cool! I didn't know that. Thanks!
arnsa
 
Posts: 2
Joined: Sun Nov 11, 2012 1:36 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 5 guests