问题描述
我正在尝试在Notepad ++中添加Go编程语言的语法插件.
I'm trying to add the syntax plugin for the Go programming language in Notepad++.
对于此类,有存储库用户定义的语言.我下载并解压缩了Go文件,这些文件包含自述文件, userDefinedLang_Go.xml 和 go.xml .
There is a repository for such user-defined languages. I downloaded and unzipped the Go files, which contained a README, a userDefinedLang_Go.xml, and go.xml.
我试图按照页面底部的说明进行操作,如下所示.由于我使用的是Windows 7(x64),因此我的Notepad ++目录为"C:\ Program Files(x86)\ Notepad ++".
I attempted to follow the instructions at the bottom of the page as follows. Since I am using Windows 7 (x64), my Notepad++ directory is "C:\Program Files (x86)\Notepad++".
之前没有安装用户定义的语言,我还没有 userDefinedLang.xml 文件,因此我将 userDefinedLang_Go.xml 复制到了根目录中,然后重命名它以删除"_Go",使其成为 userDefinedLang.xml .
Having not installed a user defined language before, I didn't have a userDefinedLang.xml file already, so I copied userDefinedLang_Go.xml into the root directory, and renamed it to remove the "_Go", making it userDefinedLang.xml.
然后我将 go.xml 复制到C:\ Program Files(x86)\ Notepad ++ \ plugins \ APIs \
I then copied go.xml into C:\Program Files (x86)\Notepad++\plugins\APIs\
这似乎是所有必要步骤.但是,当我打开Notepad ++时," Lang =>用户定义的"附近没有转到",并且 .go 文件上没有语法着色.尝试通过" View =>用户定义的对话=> import "导入会出现导入失败"错误.
This seems to be all of the steps necessary. However, when I open Notepad++, there is no "Go" near "Lang => User Defined", and there is no syntactic coloring on a .go file. Attempting to import via "View => User-Defined Dialogue => import" gives a "fail to import" error.
我做错了什么?我正在使用6.1.8版的Notepad ++的全新安装.
What am I doing wrong? I'm using a clean installation of Notepad++, which is version 6.1.8.
推荐答案
我必须将userDefineLang.xml
文件放在我的AppData\Roaming
文件夹中:
I had to put my userDefineLang.xml
file in my AppData\Roaming
folder:
C:\Users\[user]\AppData\Roaming\Notepad++
这篇关于在记事本++中添加用户定义的语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!