[TxMt] Problem with code folding in BibTeX mode

Matthias Damm textmate at macpla.net
Fri May 12 10:00:40 UTC 2006


Am 12.05.2006 um 03:27 schrieb Charilaos Skiadas:

> Hi Matthias,
>
> 	as far as I can tell, this is not possible atm. Funny enough, the  
> reason is the spaces/tabs in front of "Year". As it stands, the  
> folding will terminate on any line that starts with a non-zero  
> character, because it only checks for the existence of a right  
> brace on the line. However, there is an extra requirement for  
> foldings in TM at the moment, namely that the first non-space  
> character is at the same column location as the corresponding one  
> for starting folding marker. So no luck atm I'm afraid.

Pity, but no big deal ...

> Just out of curiosity, what prompted the need for folding  
> bibliographies? I personally do most of my bibtex work in bibdesk,  
> and I've only used TM for "search and replace" kind of work.

... since of course I am using BibDesk as well.
I just opened some .bib files in TM when I was testing a BD nightly  
version.
(And I sometimes use TM for some find-and-replace stuff in my .bib  
files, but BD has improved so much that this is very rarely necessary.)

I just thought I should mention this because TM provides code folding  
and it would be nice if it worked correctly in BibTeX mode as well.

Thanks for the quick reply,
Matthias

> On May 11, 2006, at 6:29 PM, Matthias Damm wrote:
>
>> Hi,
>>
>> I recently opened some BibTeX documents in TM (which I normally  
>> don't do since I use BibDesk) and recognized the following problem:
>> TM tries to fold the BibTeX code, but the end of the BibTeX  
>> entries are not reocgnized correctly.
>>
>> My entries look like this:
>>
>> @book{ros:02,
>> 	Address = {London},
>> 	Author = {Corey Ross},
>> 	Title = {The East German Dictatorship. Problems and Perspectives  
>> in the Interpretation of the GDR},
>> 	Year = {2002}}
>>
>> So, the fields are pretty-formatted by BibDesk, they are preceeded  
>> by a tab.
>> This causes TM not to recognize the end of the entry.
>>
>> If the entry looks like this:
>>
>> @book{ros:02,
>> Address = {London},
>> Author = {Corey Ross},
>> Title = {The East German Dictatorship. Problems and Perspectives  
>> in the Interpretation of the GDR},
>> Year = {2002}}
>>
>> or like this:
>>
>> @book{ros:02,
>> 	Address = {London},
>> 	Author = {Corey Ross},
>> 	Title = {The East German Dictatorship. Problems and Perspectives  
>> in the Interpretation of the GDR},
>> 	Year = {2002}
>> }
>>
>> everything works fine.
>>
>> Is it possible to change the code folding to work with the first  
>> version?
>> I suppose many BibTeX users on the Mac will have this problem,  
>> since probably almost all of them work with BibDesk ...
>>
>> Thanks in advance,
>> best regards
>>
>> Matthias
>>
>> -- 
>> Matthias Damm
>> mad at macpla.net
>> PGP key: http://macpla.net/MatthiasDamm.asc
>> PGP fingerprint: CED3 6074 7F7D 3148 C6F3  DFF2 05FF 3A0B 0D12 4D41
>>
>>
>> _____________________________________________________________________ 
>> _
>> For new threads USE THIS: textmate at lists.macromates.com
>> (threading gets destroyed and the universe will collapse if you  
>> don't)
>> http://lists.macromates.com/mailman/listinfo/textmate
>
> Haris
>
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate

-- 
Matthias Damm
mad at macpla.net
PGP key: http://macpla.net/MatthiasDamm.asc
PGP fingerprint: CED3 6074 7F7D 3148 C6F3  DFF2 05FF 3A0B 0D12 4D41




More information about the textmate mailing list