Hi everyone... I catalog my external media using the 'tree' command and this generates a file such as the one attached. Does anyone know of a bundle developed to allow folding for this?
Michael Gregoire <mgee@...> writes:
Hi everyone... I catalog my external media using the 'tree' command and this generates a file such as the one attached. Does anyone know of a bundle developed to allow folding for this?
. |-- a | |-- AC_DC | | |-- AC_DC - Highway to Hell.mp3 | | `-- AC_DC - You Shook Me All Night Long.mp3 | |-- Alan Parsons Project - Games People Play.mp3 | |-- Alt & The Lost Civilisation - Tequila.mp3 | `-- Archies - Sugar Sugar.mp3
Hmm, I don't think this is possible given the current folding architecture. Hopefully it will be possible with the new parser features being added for 2.0. Right, Allan, right?? ;)
-Jacob
Ahh, ok... I hope so.
Thanks Mike
On Feb 11, 2007, at 7:27 PM, Jacob Rus wrote:
Michael Gregoire <mgee@...> writes:
Hi everyone... I catalog my external media using the 'tree' command and this generates a file such as the one attached. Does anyone know of a bundle developed to allow folding for this?
. |-- a | |-- AC_DC | | |-- AC_DC - Highway to Hell.mp3 | | `-- AC_DC - You Shook Me All Night Long.mp3 | |-- Alan Parsons Project - Games People Play.mp3 | |-- Alt & The Lost Civilisation - Tequila.mp3 | `-- Archies - Sugar Sugar.mp3
Hmm, I don't think this is possible given the current folding architecture. Hopefully it will be possible with the new parser features being added for 2.0. Right, Allan, right?? ;)
-Jacob
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Michael Gregoire <mgee@...> writes:
Hi everyone... I catalog my external media using the 'tree' command and this generates a file such as the one attached. Does anyone know of a bundle developed to allow folding for this?
. |-- a | |-- AC_DC | | |-- AC_DC - Highway to Hell.mp3 | | `-- AC_DC - You Shook Me All Night Long.mp3 | |-- Alan Parsons Project - Games People Play.mp3 | |-- Alt & The Lost Civilisation - Tequila.mp3 | `-- Archies - Sugar Sugar.mp3
Hmm, I don't think this is possible given the current folding architecture. Hopefully it will be possible with the new parser features being added for 2.0.
To figure out whether a line should actually start a folding you really need to be able to look ahead to the next line, and I think you can't do that in TM. (yet?)
But if your actual data is a bunch of directories of MP3 files, a simple little language which sets
foldingStartMarker = '^(| )*|-- .*(?<!.mp3)$'; foldingStopMarker = '^(| )*`--';
does more or less the right thing. The "negative lookbehind" is the hacky heuristic to decide whether a line starts a folding or not: it will break if there are empty directories, if any file name doesn't end with .mp3, or if any directory name does. Giving the -F flag to `tree` will disambiguate the naming things (use "/$" instead of "(? <!.mp3)$", but won't fix the problem with empty directories.
One of the things I really like about TextMate is that such customizations are quick enough to be economic even for grotty single- use "languages" like this one.
-rob
Thanks for this. Unfortunately, it won't always be mp3s.
Peace Mike
On Feb 11, 2007, at 11:08 PM, Rob Shearer wrote:
Michael Gregoire <mgee@...> writes:
Hi everyone... I catalog my external media using the 'tree' command and this generates a file such as the one attached. Does anyone know of a bundle developed to allow folding for this?
. |-- a | |-- AC_DC | | |-- AC_DC - Highway to Hell.mp3 | | `-- AC_DC - You Shook Me All Night Long.mp3 | |-- Alan Parsons Project - Games People Play.mp3 | |-- Alt & The Lost Civilisation - Tequila.mp3 | `-- Archies - Sugar Sugar.mp3
Hmm, I don't think this is possible given the current folding architecture. Hopefully it will be possible with the new parser features being added for 2.0.
To figure out whether a line should actually start a folding you really need to be able to look ahead to the next line, and I think you can't do that in TM. (yet?)
But if your actual data is a bunch of directories of MP3 files, a simple little language which sets
foldingStartMarker = '^(| )*|-- .*(?<!.mp3)$'; foldingStopMarker = '^(| )*`--';
does more or less the right thing. The "negative lookbehind" is the hacky heuristic to decide whether a line starts a folding or not: it will break if there are empty directories, if any file name doesn't end with .mp3, or if any directory name does. Giving the -F flag to `tree` will disambiguate the naming things (use "/$" instead of "(?<!.mp3)$", but won't fix the problem with empty directories.
One of the things I really like about TextMate is that such customizations are quick enough to be economic even for grotty single-use "languages" like this one.
-rob
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate