Hi Allan
How diffiicult would it be to add an option to the folding system telling it to obey indentation exclusively?
With this option, TextMate would become a very nice cataloging tool for removable media: I drag and drop the CD on a TextMate window and the tab-indented list of the content appears. It is already very easy to search such lists, with folding-at-indentations it would be also easy to navigate them.
Thanks Piero
On Mar 22, 2007, at 10:07 AM, Piero D'Ancona wrote:
Hi Allan
How diffiicult would it be to add an option to the folding system telling it to obey indentation exclusively?
With this option, TextMate would become a very nice cataloging tool for removable media: I drag and drop the CD on a TextMate window and the tab-indented list of the content appears.
Yikes! I didn't know you could do that.
eo
It is already very easy to search such lists, with folding-at-indentations it would be also easy to navigate them.
Thanks Piero
Hi,
How diffiicult would it be to add an option to the folding system telling it to obey indentation exclusively?
Is this any different than what the Python bundle has to do for folding?
If not, perhaps you can get inspiration from there .. it's a little flaky atm, but it can be done.
-steve
With this option, TextMate would become a very nice cataloging tool for removable media: I drag and drop the CD on a TextMate window and the tab-indented list of the content appears. It is already very easy to search such lists, with folding-at-indentations it would be also easy to navigate them.
Thanks Piero
Steve Lianoglou <lists@...> writes:
Is this any different than what the Python bundle has to do for folding? If not, perhaps you can get inspiration from there .. it's a little flaky atm, but it can be done.
I'm afraid it is quite different. The fold markers must be given as regular expression but it seems multi-line expressions with the (?m) option do not work, and anyway, that would be a hack. Since the folding systems relies already on indentation, I thought that maybe it could be easy to add an option to use it exclusively... Piero
For the listings you get by dropping a volume or folder onto a TextMate window, directory names are always terminated with a slash. You can take advantage of this, like so:
foldingStartMarker = '/$'; foldingStopMarker = '^(?!.*/$)';
I've just tested it, and it works very nicely.
Robin
On 3/22/07, Robin Houston robin.houston@gmail.com wrote:
I've just tested it, and it works very nicely.
Actually, that's a bit of an exaggeration. It has the unfortunate effect of also folding the first file *following* a subdirectory. Hmm.
Robin
Robin Houston <robin.houston@...> writes:
Actually, that's a bit of an exaggeration. It has the unfortunate effectof also folding the first file
*following* a subdirectory. Hmm.
Yup. How to locate the first line starting with N tabs *after* a line starting with N+1 tabs, without multi-line regexen? Maybe there is a way..
Thanks Piero