TM2 (at least in Ruby) seems to treat words as what the compiler sees, rather than what the developer sees.
For example, in the following ruby code...
def some_variable @so end
With the cursor after '@so', when you hit escape, nothing happens. Given that (from the developers point of view), the accessor method for 'some_variable' and the instance variable name for the same are the same things, shouldn't that complete properly?
The same goes with symbols. This code has a similar problem...
before_filter :some_method
def some<cursor>
So far, this has probably been one of the frustrating issues in TM2 for me. Is this going to be fixed/changed?
All explained in here: http://blog.macromates.com/2012/clever-completion/#more-296
Dave.
On 25 Jan 2012, at 20:44, Darren Boyd wrote:
TM2 (at least in Ruby) seems to treat words as what the compiler sees, rather than what the developer sees.
For example, in the following ruby code...
def some_variable @so end
With the cursor after '@so', when you hit escape, nothing happens. Given that (from the developers point of view), the accessor method for 'some_variable' and the instance variable name for the same are the same things, shouldn't that complete properly?
The same goes with symbols. This code has a similar problem...
before_filter :some_method
def some<cursor>
So far, this has probably been one of the frustrating issues in TM2 for me. Is this going to be fixed/changed?
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
I actually had read the blog post about completion. Unfortunately, it doesn't provide a way for me to solve the problem. Or does it? Am I missing something? Is there an easy way to 'fix' what completion considers character classes without having to go in and change the language grammar?
On Thu, Jan 26, 2012 at 12:56 AM, Dave Baldwin dave.baldwin@3dlabs.comwrote:
All explained in here: http://blog.macromates.com/2012/clever-completion/#more-296
Dave.
On 25 Jan 2012, at 20:44, Darren Boyd wrote:
TM2 (at least in Ruby) seems to treat words as what the compiler sees,
rather than what the developer sees.
For example, in the following ruby code...
def some_variable @so end
With the cursor after '@so', when you hit escape, nothing happens.
Given that (from the developers point of view), the accessor method for 'some_variable' and the instance variable name for the same are the same things, shouldn't that complete properly?
The same goes with symbols. This code has a similar problem...
before_filter :some_method
def some<cursor>
So far, this has probably been one of the frustrating issues in TM2 for
me. Is this going to be fixed/changed?
On 26/01/2012, at 23.55, Darren Boyd wrote:
I actually had read the blog post about completion. Unfortunately, it doesn't provide a way for me to solve the problem. Or does it? Am I missing something? Is there an easy way to 'fix' what completion considers character classes without having to go in and change the language grammar?
The article explains how (word) “units” are setup in 2.0 and this is what completion uses. I.e. ‘:symbol’ is a different unit that ‘symbol’ so one is not suggested when completing the other.
There is no way to “fix” this other than make changes to what is considered a unit. I believe the source bundle has these settings, but it also affects word movement, double-click, etc.