这是史蒂夫·霍斯利(Steve Horsley)发布到golang-nuts的Geany格式说明:在Geany中,转到“工具”->“配置文件”->“ filetype_extensions.conf”,然后添加以下新标题:Go=*.go;将C定义filetypes.c复制到filedefs / filetypes.Go.conf中:cp /usr/share/geany/filetypes.c ~/.config/geany/filedefs/filetypes.Go.conf编辑filetypes.Go.conf并将设置和关键字部分更改为此:[settings]# default extension used when saving filesextension=golexer_filetype=C[keywords]# all items must be in one lineprimary=break case chan const continue default defer else fallthrough for func go goto if import interface map package range return select struct switch type varsecondary=byte int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float32 float64 complex64 complex128 uintptr string