[TxMt] ascii/binary

Alaric Snell-Pym alaric at snell-pym.org.uk
Wed Nov 15 11:43:12 UTC 2006


> You could write a module with two commands:
>
> - Open Binary
> - Save Binary

How about a generic filtering system?

TextMate picks a filter when opening a file, initially based upon the
extension etc. but with the option to override via a dropdown, then
uses the filter module to convert the file contents into characters.
And remembers to reverse the operation upon saving.

Possible filters:

  - Custom ones that, as you say, base64 or whatnot the binary
sections for preservation, while allowing the text to be edited.
  - gzip
  - Open a GDBM or other such file, see it as key = value pairs in
Win.ini style, save it back to GDBM
  - Open a PNG file, see it as key = value pairs for all the editable
text chunks (comments, copyright, etc), with a big binary block at
the bottom containing the image data and all the non-text chunks

The next development might be to have 'attachments' attached to the
TextMate buffer, so the uneditable binary sections can be elided into
such attachments and a 'reference' left in the text, to keep them out
of the way.

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/?author=4





More information about the textmate mailing list