Geany:Calculix Graphix 自定义文件类型的语法突出显示

问题描述 投票:0回答:0

我将 Geany 用于 Calculix Graphix,我设置了自定义文件类型以进行语法高亮显示。 此自定义文件类型不显示语法高亮显示(它将这些文件显示为普通文本文件)。 如果相关:我使用 Xubuntu 22.04 和 Geany 1.38.

Calculix Graphix 的语法

在每一行,一个带有可选参数和数据(坐标或实体名称)的关键字。 评论以

#
开头。 关键字和参数不区分大小写。 文件扩展名可以是:
*.fbd
*.fbl
.

我的自定义文件

Geany 文档指出自定义文件类型应该在安装目录中完成,而不是在安装目录中完成。

文件类型.CalculixGraphix.conf

我从 Abaqus 文件类型(有效)创建了这个文件并移动到

~/.config/geany/filedefs
。下面摘录

[styling]
default=default
comment=comment_line
number=number
string=string_1
operator=operator
processor=eltype
starcommand=keyword
argument=parameter

[keywords]
starcommand=anim area asgn bia mult div body break call capt cmap cntr col comp cont copy corrad csysa cut del dist div ds elem else if elty endif endwhile enq eprop exit fil flip flpc font frame gbod gonly graph grpa grps gsur gtol hcpy help int init lcmb length line lnor mata map mats max maxc maxr menu merg mesh mids min minc minr minus mm move movi msg mshp neigh node norm nurl nurs ori plot plus pnt prnt proj qadd qali qbia qbod qcnt qcut qdel qdis qdiv qenq qfil qflp qint qlin qmov qmsh qnor qpnt qnod qrem qseq qshp qspl qsur qtxt quit read rep rnam rot save scal send seqa seqc seql seta setc sete seti seto setr shpe split stack steps stop surf swep sys test thrs tra trfm txt typs ucut ulin val valu view volu while wpos wsize zap zoom

argument=tune steps time real model start on off alpha beta nadapt bg graph max maxr maxc minc mem free keep netgen tetgen thrds rbe mpc usr classic gray inferno jet coolwarm turbo viridis scal rot rad nor mir se0 pic mult div auto be2 be3 tr3 tr6 qu4 qu8 he8 he20 lock ulock be2r be2f be2d be3r be3f tr3u tr3e tr3s tr3c tr6u tr6e tr6s tr6c qu4e qu4c qu4r qu4er qu4sr qu4cr qu8e qu8s qu8c qu8r  qu8er qu8sr qu8cr he8f he8i he8r he20r pe6 pe6f pe15 pe15r te4 te4f te10 te10m te10t set rec cx cy cz equal jbir aspr mca amp mat nr descr BLEND gif png ps tga name eq ne surf volu x y z rx ry rz nolock fast tet block lonly nolength noangle angle force lin gen rem equ loops delay frames make clean abq ans nas con tie nsc v vs define compact control knot in par add ext nom new ext edg ndsb fbd stl ast dar frd gmp lst pat skv tcg bin dbin sta raw names spc slide trac pres film dflux force quadlin sur dolfyn duns isaac periodic foam cyclic cycmpc cycmpcf areampc gap afte befo nod pln cyl con tor sph abs pow float fill line edge n e p l c s b S L se sh d u f l0 t a ah eh o r g i h b k m w y x q

[settings]
extension=fbd

comment_single=#

comment_use_indent=false

context_action_cmd=

filetype_extensions.conf

我编辑了这个文件:

[Extensions]
CalculixGraphix=*.fbd;*.fbl;

我检查语法高亮的例子

PNT a0       0.95000        0.1000        0.00000
LINE l0 a0 b0 101
LCMB C007  - l13 - l12
GSUR A001 - BLEND + C001 + C002 + C003 + C004
GBOD B014 NORM - A03P - A03K + A01B + A043 + A03Z - A03O
SETA UP p a2
plot p all b
read ../rae2822.fbd
del me
div bl 12
#div all div 2
swep s1 s2 tra 0 0 0.01 1 append
comp s1 do
elty all he8f
mesh all
send all abq
plot e all
view elem on

我的研究

我的参考资料是Geany文档和这个post.

我尝试使用 Document > Define filetype 手动强制检测 filtetype 但没有成功。

这些post1post2提到了词法分析器。这是我不明白的东西我不知道我是否需要词法分析器:我没有找到任何 Abaqus 文件类型。

请让我知道语法高亮需要什么。谢谢。

syntax-highlighting file-type geany
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.