Bit record--windows 7 installed sublime Text 3, Cynwin, Sublimeclang

Source: Internet
Author: User
Tags cdata sublime text

Reprint please indicate source: http://blog.csdn.net/cywosp/article/details/34429697


1. To https://www.cygwin.com/download the Setup-x86_64.exe installation file, download the default road to install, in the selection of the library, select the appropriate GCC g++
2. To HTTP://WWW.SUBLIMETEXT.COM/3 download the installation package for Windows, install after download
3. Install the package Controlafter installing sublime text 3, open, then press the shortcut key "Ctrl +" (ESC below the key), enter the following in the pop-up input box and return:import urllib.request,os,hashlib; h = ' 7183a2d3e96f11eeadd761d777e62404 ' + ' e330c659d4bb41d3bdf022e94cab3cd0 '; pf = ' Package control.sublime-package '; IPP = Sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); by = Urllib.request.urlopen (' http://sublime.wbond.net/' + pf.replace (', '%20 ')). read (); DH = hashlib.sha256 (by). Hexdigest (); Print (' Error validating download (got%s instead of%s), please try manual install '% (DH, h)) if DH! = H Else Open (Os.pat H.join (IPP, PF), ' WB '). Write (by)Note: This content is copied from the Https://sublime.wbond.net/installation#st3. after you have installed CTRL + SHIFT + p to open, then enter the package control, select the install-related options, a lot of plug-ins can be installed. Click Preferences->browse Packages in the menu bar ... Most plugins will be installed in the same path as the popup window
4. Installation Configuration Sublimeclang
    • If you have git installed on your system, you can install it through git, go to the Plugin installation directory (the third Step Red Section action pop-up directory) and then execute the following command
git clone--recursive https://github.com/quarnster/SublimeClang Sublimeclang then go to https://github.com/quarnster/SublimeClang/downloads to download the Sublimeclang-1.0.41.sublime-package package and rename it after the download is complete Sublimeclang-1.0.41.sublime-package.zip, and then extract the files that end in the DLL to the Sublimeclang\internals directory, Restart Sublimetext you can see Sublimeclang in the menu bar preferences->package settings
Another way: If you do not have Git installed on your system, go to http://pan.baidu.com/s/1hq7iXHM to download the package that someone else has already done, and then unzip it into the plugin directory .
    • Configure Sublimeclang
Click Preferences->package Settings->sublimeclang->settings-user, and enter the following in the open ask file: { "Show_output_panel": false, "Dont_prepend_clang_includes": true, "Inhibit_sublime_completions": false, "Options":     [ "-ic:\\cygwin64\\usr\\include", "-ic:\\cygwin64\\usr\\include\\*", "-ic:\\cygwin64\\lib\\gcc\\x86_64-pc-cygwin\\4.9.0\\include", "-ic:\\cygwin64\\lib\\gcc\\x86_64-pc-cygwin\\4.9.0\\include\\c++", "-ic:\\cygwin64\\lib\\gcc\\x86_64-pc-cygwin\\4.9.0\\include\\c++\\*",     ] }
Note: The 4.9.0 is a GCC version, replaced with the corresponding version, if you install the MINGM, then the configuration is only a replacement path. after configuration, restart Sublimetext.

5. Project Join ExampleFor example: There is now a C + + open source project, Swift, in E:\WorkStation\Swift, to add it to sublime text and let Sublimeclang take it into effect. open Sublimetext, and in the menu bar, click Project->add Folder to Project ..., select E:\WorkStation\Swift, and then Project->save Project As ... Save Project after the "options" in the Preferences->package settings->sublimeclang->settings-user pop-up file, add "-ie:\\workstation\\swift","-ie:\\workstation\\swift\\*","-ie:\\workstation\\swift\\**",Save and restart Sublimetext so that code hints are available when you write your code.
6. OthersTo do the C + + development Recommendations Install C + + Snippets, ConvertToUTF8 and other plugins. In fact, many of the files ending with. Sublime-package in Sublimetext can be decompressed by changing the suffix to. zip, changing the extracted content to a. zip file and changing the file to the end of the. Sublime-package, replacing the original file, so Subl Imetext is using your configuration. many of the. Sublime-package contain files that end in. Sublime-snippet, which are the configuration that pops up when writing code. For example, when you write C + + code when you enter if you will pop up some hints, select a press ENTER will output the following code:
if (/* Condition */) { /* code * / }
At this point, press the TAB key you can see a very human design. If this style of code is not what you want, you can change it to your favorite style or write it yourself. Specifically how to write Google a bit to know, here to say how to change. Here if snippet is placed in 3\packages in the Sublime Text 3 installation path (C:\Program files\sublime text c++.sublime-package) if-.. -(IF). Sublime-snippet, the contents are as follows:
<snippet> <description>if condition</description> <content><! [Cdata[if (${1:/* Condition */}) { ${0:/* Code */} }]]></content> <tabTrigger>if</tabTrigger> <scope>source.c, SOURCE.OBJC, source.c++, source.objc++</scope> </snippet>
If you change it to the following and package it from the new c++.sublime-package and replace the original:
<snippet> <description>if condition</description> <content><! [Cdata[if (${1:/* Condition */}) { ${0:/* Code */} }]]></content> <tabTrigger>if</tabTrigger> <scope>source.c, SOURCE.OBJC, source.c++, source.objc++</scope> </snippet>
The next time you enter an if, it becomes the following code:
< Span style= "COLOR: #599ffe" >if   ( /* Condition */ )   {       /* code */
Ax, see a few more, and then add some of their own snippet, so that the time spent on writing code will be saved to do more functional logic processing. You can forkhttps://github.com/apusapp/cpp-sublime-snippet this project to your own GitHub and then modify it. Finally, download it and put it in the plugin installation directory ( Click Preferences->browse Packages in the menu bar ...). ) and named C + + snippets.
7. Project compilationAdd the C:\cygwin64\bin to the system environment variable path, and the related configuration will goolge a bit.

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.