[TxMt] Perl Indentation Problems/Register Buffers

Allan Odgaard throw-away-1 at macromates.com
Sun Nov 12 05:41:25 UTC 2006


On 12. Nov 2006, at 00:35, Rusty Conover wrote:

> [...]
> It would appear this is a general problem with a closing curly  
> brace as even,

Yes, it seems there are no indent patterns specifically created for  
Perl, so it inherits the very simple default patterns, which is:

     decreaseIndentPattern = '^(.*\*/)?\s*\}[;\s]*$';

So only ; or whitespace is allowed to follow } for it to decrease the  
indent.

> [...]
> Is it possible to have a preference so that:

No, sorry. The indent system is described here: http://macromates.com/ 
textmate/manual/appendix#indentation_rules

While I am certainly open to suggestions for how to improve this, the  
suggestions I have seen so far have made it ten times as complex, and  
still not much better.

Seems the declarative aspect needs to be dropped, if we want it to go  
much beyond what it currently can do -- though I have a few ideas for  
intermixing it more with scopes.

> Lastly a more general Textmate question coming from XEmacs. I  
> didn't see any support for register buffers.  Would there be a way  
> to add them?  As for what a register buffer does is that it allows  
> you to copy to a named "register" (commonly you pick a letter), and  
> then you can insert a register by just entering that same letter  
> that you copied the contents to.  You can see the docs from XEmacs  
> about this here:
>
> http://www.xemacs.org/Documentation/21.5/html/xemacs_13.html#SEC102
>
> This would require support for reading input from the user once  
> they hit the appropriate key binding.

I would think that clipboard history should make it out for this  
feature: http://macromates.com/textmate/manual/ 
working_with_text#clipboard_history

It’s simple enough to make a command to save the selection using some  
identifier, see http://macromates.com/textmate/manual/commands -- but  
I assume that when you want to insert it, you want to press some  
modifier + key, and not have to type in the identifier in a dialog?  
Cause that is problematic.




More information about the textmate mailing list