Sublime personal Configuration (c + + programmer)

Source: Internet
Author: User

For C + + programmers, the editor is not necessary to write code directly in the IDE. But sometimes, when you write short code or write some scripts, the editor is more necessary.

Used to be notepad++,notepad++ or very good. I want to develop in the direction of Linux, and Sublime is cross-platform, so I gave up notepad++.

Now, let's take a look at the entry-level basic operations of sublime:

First, there are two shortcut keys:

CTRL + ': ' Is the one below ESC, open the control console, you can use to run Python code, I do not know much about Python, but the installation of the package control to use the console.

Ctrl+shift+p: Open "Universal panel", in which you can find, install, delete plug-ins.

Common plugins:

1,package Control. we use sublime almost will first install this plug-in, this plug-in is the function of the management plug-in, first install it, and then install the other plug-in is convenient. Installation method:
Click the Sublime menu bar view->show Console, now open the console, this console has two columns, the above column will show real-time sublime executed what plug-in, output execution results, if you install a plug-in does not work properly, you should first Here to see if there is an error. The following column is an input box that allows you to run Python code. We enter the following code click Enter to run, you can install the package control.
       

    1. Import urllib2,os;pf= ' package control.sublime-package '; Ipp=sublime.installed_packages_path (); Os.makedirs (IPP) if Not os.path.exists (IPP) Else None;open (Os.path.join (IPP,PF), ' WB '). Write (Urllib2.urlopen (' Http://sublime.wbond.net /' +pf.replace (', '%20 '). Read ())
Copy Code

2, Sublimecodeintel code hint. Sublime The default code hints can only prompt system functions, the user creates their own functions, classes cannot be prompted. If you want to prompt yourself to establish a function. You can install the Sublimecodeintel plugin.


3,bracket Highlighter,used to match parentheses, quotes, and HTML tags. Useful for very long code. Once installed, you do not need to set up the plugin to automatically take effect. This plugin will need to be set up after installation, because the default is the following line of the way to prompt the parentheses matching, personal feeling highlighting relatively cool, set the method as follows:
Define Region Highlight Styles "Bracket_styles": {//"default" and "unmatched" styles is special//styles.    If They is not defined here,//They would be is generated internally with//internal defaults. "Default" style defines attributes that//'ll be used for any style this does not//explicitly define that ATT  Ribute.    So if/a style does not define a color, it'll/use the color from the "default" style. "Default": {"icon": "dot",//BH1 ' s original default color for reference//"color": "entity.name.cl "", "" Color ":" Brackethighlighter.default "," style ":" Underline "},//This particular style is used  To highlight//unmatched bracket pairs.    It is a special//style.    "Unmatched": {"icon": "Question", "Color": "brackethighlighter.unmatched", "style": "Outline"}, User defined region Styles "Curly": {"icon": "Curly_bracket", "Color": "BracketHighlighter.curly "//" style ":" Underline "}," Round ": {" icon ":" Round_bracket "," Color ":" Bra Ckethighlighter.round "//" style ":" Underline "}," Square ": {" icon ":" Square_bracket "," Color " : "Brackethighlighter.square"//"style": "Underline"}, "angle": {"icon": "Angle_bracket", "C Olor ":" Brackethighlighter.angle "//" style ":" Underline "}," tag ": {" icon ":" tag "," Color ":" Brackethighlighter.tag ",//" style ":" Underline "}," C_define ": {" icon ":" Hash "," Color ":" Bra        Ckethighlighter.c_define "//" style ":" Underline "}," Single_quote ": {" icon ":" Single_quote ", "Color": "Brackethighlighter.quote"//"style": "Underline"}, "Double_quote": {"icon": "Double_quote        "," Color ":" Brackethighlighter.quote "//" style ":" Underline "}," regex ": {" icon ":" Star ", "Color": "BrackethiGhlighter.quote "//" style ":" Underline "}} 

Change the underline inside to highlight.4, some other settings, sublime many settings are written by the code, and divided into two, one is the default, a user, we modify the best in the user to modify, and the best to back up before the change. 5, a few more useful shortcut keys:ctrl+r: Used to search for functionsctrl+g: Used to jump to a specified line6,c++ Snippets: You can automatically complete a block of code.     


Sublime personal Configuration (c + + programmer)

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.