Tips for using source insight

Source: Internet
Author: User
1. Use a fixed width font

The default font of sourceinsight screen font is verdana, which is always scaled. In document style, you can change the font to a courier with a fixed width.

2. Use smart tab to solve automatic indentation.

After creating a new project, clickOptions-> document optionsIn the dialog box that appears, select the document type to use in the upper left corner, mainly set the C source file and C ++ source file.Auto indentAdjust indentation. Key points in single choiceSmart, There are two check boxes on the rightIndent open BraceAndIndent close Brace, The specific effect is how you can see the sis help. According to the programming style requirements in the department, the most convenient thing is to cancel both check boxes. Click OK.

Select auto indent and smart:ProgramIf a statement without a semicolon at the end of a row, such as if, while, or switch, is written to the end of the row and press enter, the new row is automatically indented to the last row.

Remove indent open brace and indent close brace: In the last section, if "{" or "}" is entered in the relatively indented line, it is automatically aligned with the previous row.

2. Whether in our company or Huawei's programming specifications, there is a saying that the tab key cannot be used instead of four spaces. I hate this one most. What is the use of the tab key on the keyboard. But I did write it before.CodeThe problem is that even if the settings are complete on the SIS interfaceTab width = 4, The indentation shown by four spaces is different from the Indentation Position by pressing the tab key, and the latter is more dependent on the three characters in it, the Col = 5 shown in the lower left corner is the same. This code is not aligned in sis, but it is aligned in Pb. The SIS looks at its code, and there will be three cells in the Pb. Found nowOptions-> document optionsBottom right cornerEditing optionsIn the columnExpand tabsCheck and then confirm. OK. Now the indentation of the tab key and the indentation of the four spaces appear aligned in sis! In fact, I cannot figure it out. Why does the tab effect expend when the expend is not checked, but shrink is checked?

3. Some useful shortcut keys

1. Press ctrl and point to a variable. Click it to enter the definition of the variable. 2. Today, I opened a c file neatly formatted with sourceinsight and accidentally opened it with VC. After studying for half a day, we found that Si has different width for each character. Ask your colleagues to find that you can choose "View --> draft View" to make the width of each character consistent. The shortcut key is "Alt + F12" 3. "Shift + F8" to highlight the words at the cursor position in all texts. 4. Jump to a line: "Ctrl + G"

4. Create a common project

Menu "preferences-> symbol lookups"

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.