Home Download Buy Blog Forum Support

Refactor->Rename

Re: Refactor->Rename

Postby quaestor on Thu Jan 02, 2014 5:57 pm

STRICTLY speaking:

The program doesn't differentiate between variables, functions, or just plain text, so functionality as you're describing isn't possible

Not true.

Wouldn't it be possible to differentiate between functions, variables, strings, etc.

Yes.

In order to fully differentiate between functions, variable, strings, etc. you need to compile the source code

Not true.

I would love this feature as well and would be perfectly happy if it only recognized scope within the file being edited

Entirely possible.

OTOH, this would currently only be recommended in the current file, or perhaps a set of open files (i.e., the end-user would want to be extremely vigilant about what they're doing).

-----------------------------------------------

What makes this possible is far simpler than one might imagine. Textmate, and therefore ST, uses scopes for highlighting. Yes, it's that easy. We would still need someone to script up something which can examine the scope already assigned to a particular piece of code (assuming one is using an existing highlighter; if not, one would need to be created--unfortunately, this isn't trivial--or "imported" from TM) and go from there, but it should be nearly trivial.

Info on all of this is available in the Textmate and (to a lesser extent) ST docs[1]. I don't have time right now to scrape together all of the links.

I'm not certain about differences between ST2 & 3, but my sense is that this functionality has not changed significantly.

[1] More specifically, the "unofficial" ST docs.
quaestor
 
Posts: 1
Joined: Thu Jan 02, 2014 5:52 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 35 guests