On 23 May 2011, at 20:46, Mads Hartmann Jensen wrote:

> So just be sure I've got the right idea. We want to simplify likes this:
> 
> - Rather than having string -> regexp we want an array of regexp

Yes — an advantage of this is (also) that we can optionally read the list from 
the environment. That way we can set language specific patterns. I imagine the 
variable will be a la PATH, i.e. colon-separated list of regexps (but this can 
come later).

In case we end up needing to give options (like put space to the right) we 
could misuse the regexp options field, e.g.:

  TM_ALIGN_PATTERNS = "$TM_ALIGN_PATTERNS:/\S(,)\s+/r"

> - Instead of having a regexp with 2 captures we want 0|1 captures
> - add heuristics to figure out if the space should be before/after the chars
> we align after

Yes — as for the heuristic, I wouldn’t put too much energy into that part, as I 
can only come up with the comma as needing the space to be inserted after the 
capture.

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/listinfo/textmate-dev

Reply via email to