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条)

报告相同问题?

悬赏问题

  • ¥15 vue使用gojs,需求在link中的虚线上添加方向箭头
  • ¥15 CSS通配符清除内外边距为什么可以覆盖默认样式?
  • ¥15 SPSS分类模型实训题步骤
  • ¥15 求解决扩散模型代码问题
  • ¥15 工创大赛太阳能电动车项目零基础要学什么
  • ¥20 limma多组间分析最终p值只有一个
  • ¥15 nopCommerce开发问题
  • ¥15 torch.multiprocessing.spawn.ProcessExitedException: process 1 terminated with signal SIGKILL
  • ¥15 QuartusⅡ15.0编译项目后,output_files中的.jdi、.sld、.sof不更新怎么解决
  • ¥15 pycharm输出和导师的一样,但是标红