I have been using TextMate (http://macromates.com/) to manage my
ledgers, and in case anyone is curious, here's my syntax
highlighting. Just add a new bundle called Ledger, then add this as a
"Language."
{ scopeName = 'source.ledger';
fileTypes = ( 'ledger' );
foldingStartMarker = '^\d{4}\/\d{2}\/\d{2}.*';
foldingStopMarker = '^\s*$';
patterns = (
{ match = '^(\d{4}\/\d{2}\/\d{2})\s+(.+)$';
captures = {
1 = { name = 'entity.name.type'; };
2 = { name = 'string'; };
};
},
{ match = '^\t([\w\:\_\-]+)\s+([\-\$\d\.]+)';
captures = {
1 = { name = 'keyword'; };
2 = { name = 'variable.parameter.amount'; };
};
},
{ match = '^\t([\w\:]+)\s+$';
captures = { 1 = { name = 'entity.name.class.variant';
}; };
},
{ name = 'comment';
match = '(\;.+)$';
},
);
}
There's so much LISP code for integrating Ledger with emacs that I
doubt all of the functionality can ever be duplicated in TextMate.
However, TextMate - with this syntax highlighting - provides a very
simple starting point for maintaining ledger files.
Suggestions welcome.
Best,
Ian