When saving source insight, remove unnecessary spaces and the tab key

Source: Internet
Author: User

It is best to remove the space line when uploading the source code. I previously introduced the use of notepad ++. Now I find that people who are used to source insight can also easily remove it:

Options-> perferences-> files-> Remove extra white space when saving. Spaces and tabs at the end of each line are automatically removed when saving.

The experiences of another brother are as follows:

Http://blog.csdn.net/ison81/article/details/3510043

I have been using Si for several years, and I have accumulated a lot of experiences, but I still don't know anything about it. So I just want to clean it up today, I will study all the options and sort out the content that I think is useful here.

The main configurations of Si are in the options-> perferences menu,

1. General

Project file synchronization-> remove missing file from project can be selected to avoid the pop-up error dialog box because the file cannot be found.

Remove the MISC-> use stricter confirmation dialog option so that "yes" is not entered during confirmation ".

2. Typing

Source editing-> indent commands affect #-Preprocessor statements. After removal (default), the preprocessing Statement (such as # If... # endif) is not affected when multiple lines of indentation are performed ).

Auto completion-> use detailed completion window. After selection, details of this function can be displayed in Lenovo. See:

(Simple)

(Details)

Auto completion-> insert paremeters for functions. after removal, Auto Association does not output the entire parameter to the current row.

Browsing in lists-> match syllables while typing (slower ). Whether to use the syllable matching method when retrieving symbols in the symbol list box. For example, if the findnext function is used, you can enter find or next to find the function. This function may cause slow response (depending on the project and machine configuration). We recommend that you disable it, because this function can be dynamically enabled even if it is disabled by inputting spaces and then entering words.

Note that browsing in lists actually has two functions, but generally we can only see match syllables while typing. This should be because the menu design of Si is not complete, so it cannot be fully displayed in Chinese Windows, another function is match members while typing. It is used to enable/disable the function of retrieving classes/struct by member variable name.

3. Files

Opening files-> sharing: let other programs modify files, open the file in a shared manner. This is very important to ensure that the file can be edited in other edits at the same time. A typical scenario is to use the IDE environment for dynamic compilation and debugging, while using Si static reading.

Customize 'open' command... is used to set the page opened by Ctrl + O. the default option is project file list view in project window. We recommend that you keep the default option.

Saving files-> preserve undo data and revision marks after saving. If undo cannot be saved after saving, check whether this option is selected.

Remove extra white space when saving. Spaces and tabs at the end of each line are automatically removed when saving. We recommend that you select.

4. Ages

Customize Syntax Parsing for other programming languages. Let's write another article.

Do not miss conditional parsing. The conditional function here is really popular. What does conditions mean? In our code, there are usually some toggle macros. By configuring the default values of these macros in conditions, Si can regard the macros configured as disabled as invalid code, therefore, no symbol search is performed.

If there are too many switch Macros in the source code, you can also use scan files in condition parsing to automatically find all the switch macros.

5. symbol lookups

Not much special.

6. Display

The display configuration is related to your personal preferences and the display status. For example, the X60 is used and the screen resources are limited. Therefore, the project window, status bar, tool bar, and, clip windows are closed. You can use shortcuts to replace them.

Options-> horizontal scroll bars for each new window. Many Masters have taught us not to write too much code in a line. With this guiding ideology, we don't need this stuff.

Show exact case of file names. If Si doesn't get used to writing all the first letters of the file names in uppercase, check this option.

Tile source and destination windows for source link commands. Source link is often used for parsing the output results of external commands (such as make and lint). This function automatically tile the parsing results with the target window, which is very useful.

Trim long path names with ellipses. Do not select this option. In fact, this mainly affects the title bar, but generally there is plenty of space on the title bar. After the selection, we often do not know the specific location of the edited file.

7. Color

This is not to be said. How do you like configuration.

8. Syntax formatting

I think syntax coloring will certainly be one of the reasons you like Si.

Basics-> Use Only color formatting. Only enable the color settings in the style. Others such as bold, italic, and shadow are not enabled.

Apply styles for lanugage elements. Choose to enable style for classification.

Symbol reference lookups-> qualify references to members. Checks the validity of a member. If it is not part of a class/struct, style is not enabled. Although it may cause performance degradation, it is recommended to enable it. The same is true for qualify references to functions.

There is a button to enter the doc types page (Options menu can also be entered), which has many important options:

In Editing options,

Expand tabs, visible tabs can help us discover and convert tabs.
Show right margint and margin width can remind us whether to write a row too long.
We recommend that you disable the symbol Window option (because there is a shortcut key ).

In the auto indent dialog box,
If you have no special preferences, we recommend that you remove both of the smart indent options hooks. At the same time, select smart for auto indent type.

9. Syntax decorations

Some symbols can be converted into special forms for display, such as-> to →. To use this function, you cannot enable syntax formatting-> basics-> Use Only color formatting.

The three functions under Auto annotations are quite useful,

Show arrows at goto statements displays an up or down arrow at Goto, indicating whether to go up or down to goto. However, we should try not to use Goto.

Annotate closing braces with end-statement. After "}", an ID is displayed, indicating which if/switch the "}" is paired. The following annotate closing braces only for long blocks is a complementary option, indicating that the identifier is displayed only when the statement block is long.

10. Searching

Nothing special. Pay attention to automatically load selection into find pattern.

11. Remote

Options related to remote logon. It can improve the display performance for remote use.

12. Folders

Nothing special.

Finally, let's briefly describe the SI configuration file. You can use options-> load configuration/save configuration to import/export configurations. You can export all or some parts (such as style ). Si configuration has two levels: global configuration and project configuration. To facilitate entry and exit, you just need to unify one configuration. When creating a project, select global configuration (default ).

You can also double-click the configuration file to import the configuration.

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.