[TxMt] [Feature Request] Read-only Automatic Filter Views for Files

Erich Ocean subscriber at ampede.com
Mon May 2 20:41:38 UTC 2005


I don't know if TextMate supports read-only documents or not, but I 
would like to be able to specify a custom view filter for a given 
document in my project that produced a read-only text or html file in 
place of the document's content that automatically displayed as a 
normal project tab. The document in the tab view should have all of the 
TextMate-specific features of a normal Commmand output window (e.g. go 
to line, etc.)

Use Cases
---------

TextMate doesn't allow you to view jpegs, which is fine. But if I could 
define a filter to run on selection that produced HTML output, I could 
not only view the jpeg in the tab, but I could list statistics about 
the file (size, dimensions, etc.) that I could either just read or 
select and copy-and-past somewhere else in my project.

Viewing object files using the output from otool would also be handy, 
particularly with the go-to feature and the ability to convert to (more 
attractive) html output.

Man pages are another option. Define a blank file "xcodebuild.man" and 
include it in your project hierarchy, setting a project-wide .man 
filter to the output from Bwana (which does html man pgae output). Now 
you can just click on (or tab to) the man page to read it, without 
having an extra window pop-up or having to execute a command.

Custom UIs embedded in TextMate are another huge opportunity. Define a 
Project.build_ui file and filter through something that generates an 
HTML page that nicely renders all of your build options, along with 
some handy buttons to initiate a build, view the last build results (in 
an embedded HTML scroll view, whose lines have standard Command go-to 
line behavior), etc. The customization possibilities for TextMate are 
endless.

An embedded Subversion UI is another option.

An embedded Trac page is another. The possibilities are endless.

The key thing is that the filter is *automatic*. This makes it appear 
in a tab just like any other built-in TextMate feature as far as the 
user is concerned. This builds on the existing Command... 
infrastructure Allan's already built.

UI Implementation
-----------------

Select file in Project browser and choose "Filter through Script...". 
Up pops a dialog similar to the Command editor dialog. Extra options 
include: update when source changes, update on view, and update first 
time only.

Project-wide options would allow you to assign filters to extensions 
automatically (e.g. .jpg).

Any comments or suggestions are welcome.

Best, Erich




More information about the textmate mailing list