0
默认情况下* .bib文件假定geany中的latex文件的语法高亮显示。 但是,我想更改.bib文件的语法高亮。Geany:bibtex文件的自定义语法突出显示(* .bib)
我创建了中文提供文件的定义:
~/.config/geany/filedefs/filetype.Bibtex.conf
,看起来像这样:
# Geany Color Syntax support for Gnuplot 4.2+
# version 0.1
# April 5, 2013
[styling]
# Edit these in the colorscheme .conf file instead
default=default
comment=comment_line
stringdq=string_1
stringlq=string_2
stringrq=string_2
function=keyword_1
variable=keyword_1,bold
label=label
userdefined=keyword_2,bold
sectiondef=keyword_1
subsectiondef=keyword_1
ifdefinedef=keyword_1
macrodef=keyword_1
stringvar=string_1
number=number_1
sectiongroup=keyword_1
pageex=keyword_1
functiondef=keyword_1
commentbox=comment
[keywords]
# all items must be in one line
variables=abstract address annote author booktitle chapter contents copyright crossref doi edition editor institution isbn issn lccn journal key keywords month note number organization pages price publisher school series title type url language volume year
userdefined=article book booklet conference inbook incollection manual masterthesis misc phdthesis proceedings techreport unpublished
[lexer_properties]
nsis.uservars=1
nsis.ignorecase=1
[settings]
# default extension used when saving files
extension=bib
# single comments, like # in this file
comment_single=#
# multiline comments
#comment_open=
#comment_close=
# This setting works only for single line comments
comment_use_indent=true
# context action command (please see Geany's main documentation for details)
context_action_cmd=
# lexer filetype should be an existing lexer that does not use lexer_filetype itself
lexer_filetype=NSIS
[build-menu]
EX_00_LB=Execute
EX_00_CM=rm fit.log; galfit %e.gal; rm galfit.0*; open fit.log
EX_00_WD=
FT_00_LB=
FT_00_CM=
FT_00_WD=
FT_02_LB=
FT_02_CM=
FT_02_WD=
然后,我包括在该文件的文件扩展名:
~/.config/geany/filetype_extensions.conf
现在假设我有一个样本bib文件,例如 bibtex3.bib它看起来像这样:
@article{einstein,
author = "Albert Einstein",
title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]",
journal = "Annalen der Physik",
volume = "322",
number = "10",
pages = "891--921",
year = "1905",
DOI = "http://dx.doi.org/10.1002/andp.19053221004"
}
但我仍没有看到的名为.bib文件的语法高亮显示。
一些相关链接:
http://www.geany.org/manual/0.14/#filetype-extensions
Custom syntax highlighting in Geany
Make Geany recognize additional file extensions
问题:如何自定义在geany语法高亮名为.bib文件?