Hi,
First of all thanks for the great plugin!
Hovewer, I am using vim-latex in combination with Bibdesk for OSX
which capitalizes field names. This shouldn't be a problem as these
field names should be treated case insensitive. However, vim-latex
doesn't. It can be easily fixed by changing line 46 in bibtools.py:
from: field = m.group(1)
to: field = m.group(1).lower()
This also means that all subsequent calls to lower() are redundant and
can be removed. Without this patch vim-latex will find the entry but
it cannot view the specifics or filter on them.
Kind regards,
Nicholas
--
A small patch:
--- bibtools.py.old 2008-12-22 11:22:51.000000000 +0100
+++ bibtools.py 2008-12-22 11:25:18.000000000 +0100
@@ -43,7 +43,7 @@
if not m:
break
- field = m.group(1)
+ field = m.group(1).lower()
body = body[(m.start(2)+1):]
if m.group(2) == '{':
@@ -90,7 +90,7 @@
body = body[(mn.start(0)+1):]
self['bodytext'] += (' %s: %s\n' % (field, value))
- if self['bibtype'].lower() == 'string':
+ if self['bibtype'] == 'string':
self['macro'] = {field: value}
self['bodytext'] = self['bodytext'].rstrip()
@@ -103,34 +103,34 @@
return ''
def __str__(self):
- if self['bibtype'].lower() == 'string':
+ if self['bibtype'] == 'string':
return 'String: %(macro)s' % self
- elif self['bibtype'].lower() == 'article':
+ elif self['bibtype'] == 'article':
return ('Article [%(key)s]\n' +
'TI "%(title)s"\n' +
'AU %(author)s\n' +
'IN In %(journal)s, %(year)s') % self
- elif self['bibtype'].lower() == 'conference':
+ elif self['bibtype'] == 'conference':
return ('Conference [%(key)s]\n' +
'TI "%(title)s"\n' +
'AU %(author)s\n' +
'IN In %(booktitle)s, %(year)s') % self
- elif self['bibtype'].lower() == 'mastersthesis':
+ elif self['bibtype'] == 'mastersthesis':
return ('Masters [%(key)s]\n' +
'TI "%(title)s"\n' +
'AU %(author)s\n' +
'IN In %(school)s, %(year)s') % self
- elif self['bibtype'].lower() == 'phdthesis':
+ elif self['bibtype'] == 'phdthesis':
return ('PhD [%(key)s]\n' +
'TI "%(title)s"\n' +
'AU %(author)s\n' +
'IN In %(school)s, %(year)s') % self
- elif self['bibtype'].lower() == 'book':
+ elif self['bibtype'] == 'book':
return ('Book [%(key)s]\n' +
'TI "%(title)s"\n' +
'AU %(author)s\n' +
------------------------------------------------------------------------------
_______________________________________________
Vim-latex-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel