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

Source: Internet
Author: User
Tags command line sublime editor sublime text

first of all, thank the online users ...

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.0 name=sublime Text 3 # only KDE 4 seems-use genericname, so we reuse the KDE strings.
# from Ubuntu ' s language-pack-kde-xx-base packages, version 9.04-20090413. Genericname=text Editor exec=sublime terminal=false icon=/opt/sublime Text 3/icon/48x48/sublime_text.png Type=
Application Categories=texteditor;ide;development X-ayatana-desktop-shortcuts=newwindow [NewWindow Shortcut Group] Name=new Window exec=sublime-n targetenvironment=unity 
   f) In order to avoid having to re-enter the registration code each time the sublime is started, the following command needs to be executed:
   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:
Import Urllib.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 the Packages control and select Install Packgae,
	Select the plug-in 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) plugin Golang Tools integration
	b) Plugin 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 (7) Windows installation ctags first download Ctags.exe:http://www.vim.org/scripts/script_search_results.php?keywords=ctags.exe &script_type=&order_by=rating&direction=descending&search=search next put Ctags.exe in C:\Windows\ System32 finally follow the Linux operation
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.