doujilou3903 2015-01-02 19:24
浏览 285
已采纳

Notepad ++的Go语言插件

Did someone try using golang (Go programming language) plugin for Notepad++?

I tried the instructions published at the below link, but it did not work for me. Just wondering if it worked for anyone:
http://go-lang.cat-v.org/text-editors/notepad-plus-plus/

  • 写回答

2条回答 默认 最新

  • dpnru86024 2016-03-31 09:47
    关注

    How to install user defined language Notepad++ for golang.

    *EDIT: UPDATED in 26/12/2018

    Method 1 :

    • Download golang.udl.xml on gist github and then open Notepad++
    • Go to Toolbar Menu => Language -> "Define your language..." -> Import.
    • Import golang.udl.xml and restart Notepad++.

    and method 2 is my recommended version because it's automatically highlighting go files.

    Method 2 (Recommended Version) :

    • Go to Toolbar Menu => Settings -> "Style Configurator...".
    • in "Language :" box choose "C"
    • in "Style :" box choose "INSTRUCTION WORD"
    • in "User-defined-keywords" box, copy paste the keywords below.
    • var func append utf8 nil cap close closed copy image len make new panic print println range real recover select chan defer go interface map range true false
    • then in "Style :" box go to"TYPE WORD", copy paste the keywords below to "User-defined-keywords" box.
    • string package import type uint uintptr uint8 uint16 uint32 uint64 int8 int16 int32 int64 float32 float64 complex complex64 complex128 byte rune iota
    • Change Foreground colour style to RED.
    • IMPORTANT STEP: in "User-ext. :" box type "go". and click "Save & Close" button, then restart Notepad++. enter image description here
    "English is not my mother tongue; please excuse any errors on my part."
    

    the reason why choosing method two rather than method one is because UserDefinedLanguage in Notepad++ still having a bugs, Operators & Delimiters feature in NPP cannot correctly do their job. if you are not disturbed by the delimiter then method one is quite good.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题