问题描述
我有类似的问题;
我在 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 手册,也看过一些帖子,但没有一个完全回答这个问题(在第二个溢出链接上,用户已映射到现有文件类型,因此他没有得到他希望的行为)。
- geany custom filetype .sass for syntax highlighting
- Geany: Syntax highlighting for custom filetype for SOME words
您对如何解决此问题有任何想法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)