editor that offers a search only in cursor scope

G

Gumby

Does anyone know of an c++ code editor with this feature,
supposing the cursor is inside functionX(), I'd like to
be able to have the search for a string to look only
in the scope of the { }. For example, if I search for
"variablename" and the cursor is in functionX I only
want the search to find the one in functionX and not
the one in functionY. But if the cursor is outside any
function, then it should search in file scope (anywhere in
file). Any editors do that?


void
Class::functionX()
{
int func = 0;
float size;
.........

int variablename;
....
}

void
Class::functionY()
{
int variablename = 0;
........

}
Mark
 
M

Micha

Gumby said:
Does anyone know of an c++ code editor with this feature,
supposing the cursor is inside functionX(), I'd like to
be able to have the search for a string to look only
in the scope of the { }. For example, if I search for
"variablename" and the cursor is in functionX I only
want the search to find the one in functionX and not
the one in functionY. But if the cursor is outside any
function, then it should search in file scope (anywhere in
file). Any editors do that?

in VIM if the cursor is on an identifiere and you type gd (go definition) it
show the first use, local top the function and if you type gD it looks for
it globally.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top