微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

geany 自定义文件类型 .svrf 用于语法高亮

如何解决geany 自定义文件类型 .svrf 用于语法高亮

我有类似的问题; 我在 filetype_extensions.conf 添加中复制并编辑了 ~/.config/geany

CALIBRE=*.rul;*.svrf;*.SVRF;*.cal;

然后在 ~/.config/geany/filedefs 下我创建了以下文件

filetypes.CALIBRE.conf ==> 我的自定义文件类型

filetypes.commmon ==> 我想要特定颜色的 named_styles

# For complete documentation of this file,please see Geany's main documentation
[styling]
comment=svrf_comment
key=svrf_keyword_comment,bold

[settings]
# default extension used when saving files
extension=svrf
lexer_filetype=NONE

[keywords]
# all items must be in one line
svrf=EXT ENC INT EXPAND 


# the following characters are these which a "word" can contains,see documentation
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMnopQRSTUVWXYZ0123456789

# single comments,like / in this file
comment_single=//
# multiline comments
#comment_open=/*
#comment_close=*/

# set to false if a comment character/string should start at column 0 of a line,true uses any
# indentation of the line,e.g. setting to true causes the following on pressing CTRL+d
    #command_example();
# setting to false would generate this
#   command_example();
# 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=

[indentation]
#width=4
# 0 is spaces,1 is tabs,2 is tab & spaces
#type=1

[build-menu]
# %f will be replaced by the complete filename
# %e will be replaced by the filename without extension
# (use only one of it at one time)
#FT_02_LB=_Lint
#FT_02_CM=jshint "%f"
#FT_02_WD=
#error_regex=([^:]+): line ([0-9]+),col ([0-9]+)

然而,当我打开一个 svrf 文件类型时,我的自定义文件类型无法识别(在我选择了一些样式时没有特定的颜色)。

如果我选择 [styling=C]lexer_filetype=C,我会得到“C”代码的颜色...

我也尝试过 [styling]lexer_filtype=NONE,但我的自定义突出显示再次无法识别。

我已经准备好了 geany 手册,也看过一些帖子,但没有一个完全回答这个问题(在第二个溢出链接上,用户已映射到现有文件类型,因此他没有得到他希望的行为)。

您对如何解决此问题有任何想法吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?