Sublime: Build Go editor and run Golang program with terminal compilation

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

First of all, thank you online friends!!!

First, sublime download and install

(1) Sublime download

Choose to download the latest version of the sublime editor according to your own system version: HTTPS://WWW.SUBLIMETEXT.COM/3. I downloaded the Ubuntu tarball version of the bit.

(2) Sublime installation

A) Decompression: user@wolf:~$ TAR-JXVF sublime_text_3_build_3126_x64.tar.bz2

b) Move the decompressed sublime_text_3 to the/opt/directory (optionally optional): user@wolf:~$ sudo mv sublime_text_3/opt/

c) Create a link for sublime: user@wolf:~$ sudo ln-s/opt/sublime_text_3/sublime_text/usr/bin/sublime

d) Create a sublime desktop icon or add it to Unity luncher(optional): user@wolf:~/downloads$ sudo sublime/usr/share/applications/ Sublime.desktop

e) After performing the previous step, sublime will launch the Sublime.desktop file and paste the following into the file: The contents are as follows

[desktop entry]version=1.0name=sublime Text 3# only KDE 4 seems to use genericname, so we reuse the KDE strings.# from Ubuntu ' s language-pack-kde-xx-base packages, version 9. 04-20090413.genericname=text editorexec=sublimeterminal=falseicon=/opt/sublime Text 3/Icon/48x48/sublime_ Text.pngtype=applicationcategories=texteditor;ide;developmentx-ayatana-desktop-shortcuts=newwindow[newwindow Shortcut group]name=new windowexec=sublime-ntargetenvironment=unity  
  F) to avoid having to re-enter the registration code each time you start sublime, you need to execute the following command: 
 user@wolf:~$ sudo chown-r oliverli:oliverli/home/oliverli/.config//opt/sublime _text_3/
   f) Registration code: Can look for registration from the Internet, here recommend a big God's registration code set (thank the Netizen): https://fatesinger.com/78705
(3) Sublime Plug-in installation
A) press CTRL + ' bring up the console (or open the command line via the View->show console menu) and paste the following code into the bottom command line and enter:
Importurllib.request,os; pf =' Package control.sublime-package '; IPP = Sublime.installed_packages_path ();  Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); Open (Os.path.join (IPP, pf),' WB '). Write (Urllib.request.urlopen (' http://sublime.wbond.net/'+ pf.replace (' ','%20 ') ). Read ())
If the installation is successful, you can see the package settings and the two menus under the Preferences menu.
  B) Plug-in installation, using the package Control component installation: Under the Preferences menu, see Package Control and select Install Packgae, 
  Select the plug-ins you want to install as needed. can refer to the user's plug-in collection: (thanks) 
  http://www.jeffjade.com/2015/12/15/ 2015-04-17-toss-sublime-text/#two 
  http://www.jianshu.com/p/3cb5c6f2421c 
  http://www.xuanfengge.com/ Practical-collection-of-sublime-plug-in.html 
Http://www.cnblogs.com/hykun/p/sublimeText3.html
(4) Create Golang Editor
  a) plug-in Golang Tools integration 
  B) Plug-in Godef,goimports,gorename,golint, Gogdb,gorazer,gosublime,gotools,gotags,gotests, etc. 
(5) Compile and run the program in terminal
A) Install the plugin terminal
b) After writing the program you can use Ctrl+shift+t to start terminal or right-click "Open terminal Here"
(6) Shortcut keys
Please refer (thanks) https://www.douban.com/note/362268947/

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.