go-notepad++

Source: Internet
Author: User
Tags gocode
This is a creation in Article, where the information may have evolved or changed.

This article pauses the go syntax while turning to the editor notepad++. --工欲善其事, its prerequisite.

Resources

notepad++ support Go language highlighting with Go language plugin

Installing the GONPP Plugin

In notepad++, select menu: Plug-in/plugin–> Plugin manager–> Show Plugin Manager
In the Plugin Manager dialog box that pops up, just look at the available page, select GONPP and install.

Gonpp

Is the description information when GONPP is selected:

GONPP assists you writing Go-programms. It has code completion and function Calltips (using Gocode, see below) as well as direct interaction with the GO command. Currently the following actions are implemented:
Gocode Complete, Alt+o | | Gocode Calltip-Alt+p
Go fmt-alt+f | | Go Test-alt+t | | Go install-alt+i | | Go run-alt+r

Please note, this you must has the GO programming language installed on your computer for make use of GONPP. You can get GO from Http://golang.org/doc/install

The code-completion you need to has Gocode installed and located either in your PATH or in Goroot/bin. You can get Gocode from https://github.com/nsf/gocode!
Author:tike
Source:https://github.com/tike/gonpp
Homepage:https://github.com/tike/gonpp
Latest update:28.03.2014 (v1.2.0.0)
-Gocode Integration (complete with calltips)
-Thanks mateusz!

19.02.2014 (v1.1.0.0)
-minor fixes, see Git repo for details

24.01.2014 (v1.0.0.0)
-Inital Release

Trial

You can open a go file and select Plug-in –> gonpp–> go run, it will run the current go file and open a Go cmd Output window to display the results of the run. So, you can edit and run it in the notepad++ editor.

You can experiment with other commands.

Gocode

Follow the instructions above to open the page: Https://github.com/nsf/gocode, executed the following command, but did not see what effect ... The following record is here ...

User@Host MINGW32 /d/examples$ mkdir tempcUser@Host MINGW32 /d/examples$ cd tempUser@Host MINGW32 /d/examples/temp$ go get -u -ldflags -H=windowsgui github.com/nsf/gocodeUser@Host MINGW32 /d/examples/temp$ lltotal 0User@Host MINGW32 /d/examples/temp$

Idesandtexteditorplugins

In the Go installation directory, there is a file: Go/misc/editors, which reads as follows:

For information about plugins and other support for Go in editors and shells,
See this page on the Go Wiki:

Https://golang.org/wiki/IDEsAndTextEditorPlugins

This page gives a variety of editor support go method, find the notepad++ section, as follows:

notepad++: Free source code Editor for Windows.
-Notepadplus-go Syntax Highlighting, Functions list panel (for code browsing), code completion for keywords & builtin S.
-The GONPP plugin (available via notepad++ ' s built-in plugin Manager) provides code completion (requires Gocode), Functio n Calltips, Goimports integration, and keyboard shortcuts for common go commands. [Sources, binaries].
-Goautocomplete is another code completion plugin.

Syntax highlighting

Page Address: https://github.com/chai2010/notepadplus-go

Download 3 XML files from this page to local (there is a problem with the direct download of XML, you can find a workaround), and then find the location of the local notepad++ XML file. --related to Windows OS, as an example of the author's environment, is
c:\users\myusername\appdata\roaming\notepad++

Copy the contents of the Userdefinelang.xml on the webpage to the userdefinelang.xml corresponding location of the notepad++. Then restart notepad++, and you can see the go&goasm at the bottom of the language menu. Select to see the go file syntax highlighted.

Function List

The next step is to display the list of functions in the go file in notepad++, so you don't have to scroll up and down to open your eyes to the target function.

Same drop, replace Functionlist.xml. and then reboot. --perhaps the reader thought, why not modify the XML first, and then restart it directly? --Yes, it can ....

--If the function cannot be displayed in the function table of notepad++, then you can reload.

Keyword auto-completion

Copy the Go.xml to the following directory: d:\notepad++\plugins\apis--according to its own notepad++ installation directory selection, the APIs have a variety of language XML.

Restart notepad++.

Here you can borrow the Https://github.com/chai2010/notepadplus-go map directly:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.