duanhuhong5255 2012-09-24 23:02
浏览 284

在Notepad ++中添加用户定义的语言

I'm trying to add the syntax plugin for the Go programming language in Notepad++ .

Ther 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.

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++".

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.

I then copied go.xml into C:\Program Files (x86)\Notepad++\plugins\APIs\

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.

Any idea what I'm doing wrong? I'm using a clean installation of Notepad++, which is version 6.1.8.

  • 写回答

8条回答 默认 最新

  • dongpu1881 2012-09-24 23:18
    关注

    I just got it working on my system after some tinkering, put this at the top of the userDefinedLang.xml file and the go.xml file:

    <?xml version="1.0" encoding="Windows-1252" ?>
    

    That should do the trick (after reopening Notepad++)

    go.xml should be in the plugins/APIs folder, and userDefinedLang.xml goes in the root of Notepad++ as you said.

    Hope that helps.

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?