Source insight Configuration

Source: Internet
Author: User
Tags ultraedit
Source insight code alignment Tab key release Edition

I have also written a source insight code alignment before. Because I do not understand it well enough, I can only solve some problems. I cannot solve the problem that the Code alignment in source insight is messy in the XXX editor.

After changing the font to Courier New, the main reason why the Code cannot be aligned is the problem of Tab and space. In many large companies, such as Huawei, it is a good habit to prohibit the use of Tab in code. Some people have to say something, but they are not allowed to use tabs for alignment. You want to get tired of me. You do not need to use Tab to align. It does not mean you cannot use the Tab key. Press to set your source insight. FirstTab WidthSet to 4, that is, the position where a Tab occupies 4 spaces. Expand tabsThe option must be replaced by the corresponding space when you press the Tab key (not necessarily four spaces, but alignment can be ensured ).Visable
Tabs
The Tab is visible, and spaces in the code of reminding others can be easily modified. If you write code in this way, there will be no errors. What should I do with the code that has been written before? Read down.

For a file already written, there may also be incorrect code. In the settings, the effect will appear, because Tab alignment is used.

Select the code to be modified, and thenEdit-"Special Edit-"Tabs to spaces, Replace the tabs in the selected code with spaces.

Because CTRL + A is occupied by Save all, you need to change the shortcut key. InOptions-"key assignmentOperate in the displayed window as shown in the figure.

In the command box, enterSaveAnd then selectSave all, CTRL + A delete, and then clickAssign New Key, Press Ctrl + Shift + A on the keyboard.

EnterSelect, SelectSelect allClick assign new key and press Ctrl + A on the keyboard. In this way, CTRL + A becomes the all-selected shortcut key.

Source insight displays the complete path name in the title bar

Assume that I have opened the file in source insightE:\code\module1\souce\temp.cIn the source insight title barTemp. c path is (E: \ code \ .. \ source). We want to displayThe complete path name of temp. c is as follows: (E: \ code \ module1 \ source). What should I do?

Choose Options> preferences> display.

Set trim long path names with ellipses to unselect.

Use the Courier New font for source insight under win7

Wuhao asked how to use the Courier New font in win7. I didn't pay attention to it before. Now I switched back to win7 and found this problem. After some experiments, I finally got it done.

The reason is that the new courier font of win7 is not displayed by default, so it cannot be displayed when the font is set in source insight.

Solution:Control Panel-"Appearance and personalization,Then follow the image

Then the settings under source insight should be OK.

PS: Source insight download win7 available

Source insight code alignment

Because source insight uses verdana fonts by default, these fonts are not of equal width. If this font is used, it is difficult to align itself (whether it is a space or a tab key ).

To change the font of source insight, we recommend that you use the Courier New font, which is the size of 9. MethodOptions-> Document Options, As shown in.

For Auto Indenting, Click Here and set it to as shown in. The Code Alignment Method conforms to the Microsoft style.

It is not enough to complete the above settings. The Verdana font will still be used for comments in the code or some other text.Options-> Style PropertiesVarious code style settings. The method is to select each item in Style Name and set it to = in Font Name. As shown in.

Alternatively, you can easily import the Style Properties file and the GLOBAL_xinzero.CF3 file.

There is no problem with code alignment in this step. To be nice, you also need to change the font in the context (associated window) window of source insight. Method, inRight-click the context window and choose Font...Select the Courier New font.

After the above modifications are tested, the code is aligned under CCS3.3, Keil uVision, and VS2005. By default, UltraEdit has two tabs and is aligned after being changed to 4 characters.

Switch Tabbar of source insight)

If you are familiar with using UltraEdit or Visual Studio, you may prefer to use tags to switch between files. However, source insight does not provide such a function, today, we can see a tool that can be implemented. It is a project on codeprojetct. You can view the source code and compile and generate it yourself. Shows the effect of the label toolbar.

It is not convenient to use this tool for projects of small scale. Select "View-> project window" in the menu ", select the "project File List" view in the lower left corner of the Project window. The files contained in the project can be displayed. Switching is convenient here.

Source Insight extended programming language syntax highlighting-use of source insight

Source insight already comes with syntax highlighting for some languages, such as C and C ++. The following describes the association and syntax highlighting of some languages not included in SI.

How source insigh associates with. cc files(The. CC file and. cpp file are both C ++ source files)
Option-> document option-> Add *. CC in "file filter"

Alternatively, choose Options> preferences> ages> C ++ language, click "Doc types" on the right to bring up the ">" document options "-> Add * in" file filter *. CC

NoteSelect C ++ Language for combo and modify it."File filter"

Adding. s Assembly Language Association is similar to this.

How source insight associates verlog files

1. Delete the previous version of OpenGL. CLF, options-> preferences-> ages-> Delete-> OpenGL;

2. Add a new maid, options-> preferences-> ages-> Import-> *. CLF;

3. Added support for the association of documents with different codes. For example, document options-> Add type. In the "Add new document type" dialog box, write the variable in sequence;

4. Write *. V in the file filter editing box.

4. Click "language" and select "Verilog m ".

Click to download

Source insight build project-use source insight

Generally, you can use source insight to write code. This example uses the Keil project as an example. (If the editor provided by Keil is not aligned well, it is difficult to write the code, and it is more difficult to read the code, but you must use the Keil compiler ). Create a work by using Keil, and then create an SI folder under the project folder.

Open source insight to create a project

Select the new SI directory from the project path, and then select the source file directory managed by source insight as the root directory of the keil project. In this example, select the Test directory. Click OK.

Because the source insight Project contains multiple files, put the source insight Project files in the SI folder for convenient management. It also facilitates project copying and SVN version control. When using it, find the. PR file in the SI folder and double-click it to open the SI project.

Because source insight stores the path in the project file and uses the relative path, when copying the project and converting the path stored in the project, the file path may be incorrect, as a result, the files in the open project cannot be found. In case of confusion, you can use UltraEdit and other tools that can be edited in hexadecimal mode to edit the. PR file ., Add main. c. In the directory where the project file is located, because there is a large number of project files, there is a TEST path, and you can delete the TEST/five paths after the fd ff, just change them. PR file appearsFirst(Must be the first) FD
The directory followed by FF. Others will be updated automatically.

Introduction to source insight-download source insight

Programmers should be familiar with source insight. If you haven't used it, we recommend you use it now. Download Source insight.

The installation package already contains Chinese-based patches. Although the author has repeatedly stressed that Chinese-based patching is hard, Chinese-based patching is not recommended because there are not many English versions and menus are commonly used in English, it is also easy to understand, and the Chinese interface is ugly.

This source insight is installed, of course, contains XX code, you know. I have also used the green version before, but I still feel that the installation version is easy to use, or because the green version is not good enough.

Source insight contains viewing references, which allows you to view where a variable or function is called. You can automatically complete functions or variables when writing code.

Although the Chinese language support is not friendly at present, there is no problem with the use, that is, when Chinese characters are deleted, they are deleted in half words, which may cause garbled characters.

Source insight is currently the latest version 3.50. Go to the official website to view http://www.sourceinsight.com /.

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.