Some tips on Source Insight

Source: Internet
Author: User
Tags tortoisesvn

 

1. Select the background color

To change the background color Options> preference> windows background> color, set the background color.

2. Solve the Problem of equal-width alignment of Characters

The default SIS font is VERDANA, which is very beautiful. This web page should also use VERDANA fonts. But for the sake of beauty, VERDANA fonts are not wide. For example, the following two rows

Llllllllll

Mmmmmmmm

The length is also 10 characters, which is too long. VERDANA is used to check the program, and some of them should be aligned. The method of liberation is to use an equal-width font, but it must be ugly. Courier New is recommended.

3. Solve the TAB key indent Problem

Options-> in the Editing Options column in the lower-right corner of Document Options, check Expand tabs, and then confirm. OK. Now the TAB key indent and four spaces indent appear aligned in SIS.

4. Automatic Alignment settings in SI

In the C program, IF 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 previous row. Option-> Auto Indient Type in Auto Indient under Document option has three types: None, Simple, and Smart. The Simple type is recommended for individuals.

5. When adding files to a project, add only specific types of files (File Type Filter)

When editing assembly code, when creating a PROJECT in SIS and adding a TREE, according to the default settings, all Assembly files in the TREE are not included. inc and. ,. s suffix does not exist. In addition, the. s file opened with SIS is black and white, and there is no color. It feels like it is back to the EDIT age of DOS ...... Solution: In Options-> Document Options, click the Document Type drop-down menu on the left, select x86 Asm Source File, and then in the File filter on the right *. asm ;*. add *. s; then CLOSE. The above problem is solved, but note that after adding *. s, you need to ADD the TREE again to ADD the assembly to the PROJECT.

6. Add file types

You can define your own types, Options-> Document Options-> add type, and define the file type name and file name suffix. Select include when adding to projects and add files under the Add directory to the project. This type of files will be added to the SI project. If you want to add all files to the SI project, you can define a file type *.*.

7. Restore the full selection function of ctrl +

Use the keyword save to find save all, change it to ctrl + shift + a, select all through the keyword select, and change it to ctrl +

 

 

Common shortcut keys for Source Insight:

Ctrl + =: Jump to definition

Alt +/: Look up reference

F3: search backward

F4: search forward

F5: go to Line

F7: Look up symbols

F8: Look up local symbols

F9: Ident left

F10: Ident right

Alt +,: Jump backword

Alt +.: Jump forward

Shift + F3: search the word under cusor backward

Shift + F4: search the word under cusor forward

F12: incremental search

Shift + Ctrl + f: search in project

Shift + F8: hilight word

 

Window operations of Source Insight:

Project window Ctrl + O open

Symbol window Alt + F8 Open and Close

Contex Window custom key opening and closing

The Relation Window custom key is opened, locked first, and then refreshed.

 

To add a custom feature to Source Insight, follow these steps:

1. In Source Insight, Options-> Custom Commands...-> Add..., New Command name can be written at will. My name is "Edit with Vim"

2. run: "C: \ Program Files \ Vim \ vim63 \ gvim.exe" -- remote-silent + % l % f, this indicates opening the current file in the currently opened gvim window and redirecting to the specified row. % l indicates the current row number and % f indicates the file name, the function of using -- remote-silent is to jump to the corresponding row instead of opening the corresponding file for the second time.

3. In the same dialog box, select Keys-> Assign New Key...-> press F12. If you have set F12 to another command, select another Key.

 

The following are some common CUSTOM functions: (custom commands) some of them correspond to SVN, and Version Management SVN needs to be installed.

Open Resource Manager and select the current file

ShellExecute open explorer/e,/select, % f

View log

"C: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe"/command: log/path: % f/notempfile/closeonend

Diff

"C: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe"/command: diff/path: % f/notempfile/closeonend

Get the lock (check out)

"C: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe"/command: lock/path: % f/notempfile/closeonend

Submit (check in)

"C: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe"/command: commit/path: % f/notempfile/closeonend

Update)

"C: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe"/command: update/path: % f/notempfile/closeonend

Update all)

"C: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe"/command: update/path: *. */notempfile/closeonend

Undo check out)

"C: \ Program Files \ TortoiseSVN \ bin \ TortoiseProc.exe"/command: revert/path: % f/notempfile/closeonend

Edit in ultriEdit

"C: \ Program Files \ UltraEdit-32/uedit32" % f

Edit and locate the current row in vim

"C: \ Program Files \ Vim \ vim63 \ gvim.exe" -- remote-silent + % l % f

More details

ShellExecute open explorer/e,/select, % f

/* The function is to open the current editing file in the resource manager and select */

/* You can set the shortcut key, such as ctrl + e, to easily open the corresponding file in the resource manager and perform tortoiseSVN operations */

 

X: \ Progra ~ 1 \ TortoiseSVN \ bin \ TortoiseProc.exe/command: log/path: %/notempfile/closeonend

/* Change the corresponding bin installation path before use */

/* Directly view the svn log of the current file */

/* Shortcut keys such as ctrl + l */

 

X: \ Progra ~ 1 \ TortoiseSVN \ bin \ TortoiseProc.exe/command: diff/path: %/notempfile/closeonend

/* Change the corresponding bin installation path before use */

/* View the comparison between the current file and the reference version */

/* Shortcut keys such as ctrl + d */

 

Other tips:

Make {And} unindent: Options-> Document Options-> Auto Indent-> Indent Open Brace/Indent Close Brace

 

Press ctrl and point to a variable. Click it to enter the definition of the variable.

 

A c file formatted neatly with sourceinsight is accidentally opened with VC.

Cause: It is found that SI has different width for each character.

Solution: select "view --> draft view" to make the width of each character consistent. The shortcut key is "Alt + F12"

 

"Shift + F8" highlight all words in the text where the cursor is located

 

Jump to a line: "ctrl + g"

 

File filter in Source Insight

When creating a new project, you need to add some addition. c. files other than h, such. s ,. scf, Makefile, and ReleaseNotes files, and even if the shown only known document types is canceled each time you create a project, and after you click Add All, select Recusively add lower sub-directories, this type of files still cannot be identified, so they cannot be added to the project. We can only manually double-click them to add them to the project. If there are few files, it doesn't matter, but it contains many large projects with subfolders, this is really not feasible.

 

The solution is as follows:

 

Open Source Insight and enter

 

Options-> Document Options... alt-T-> click the Document Type drop-down box and select Make File. In the File Filter on the right, in the original *. add a semicolon after the mak, that is, multiple different filtering rules are separated by semicolons, and add * makefile *. mak; * makefile, and select Include when adding to projects. In this way, you can identify makefile or Makefile when creating a new project (as if Source Insight is not case sensitive ).

 

Similar principle: add different types of files you want to add to the backend of some original file types respectively. Be sure to separate them with semicolons or directly create a new file type, then write the corresponding concern rules, such

 

Click Add Type, enter the name of the new File Type Scatter File, and write * in File Filter *. if you select Include when adding to projects in the lower part, a new file type is created. when a new project is added to a file, the system will be able to identify files with a suffix of scf.

Of course, if you are interested, you can also perform some formatting settings for the new file type. Including Parsing and Tab settings.

 

Source insight supports. S Assembly files

In Options-> Document Options, click the Document Type drop-down menu on the top left, select x86 Asm Source File, and then in the File filter on the right *. asm ;*. add *. s ;*. S and then CLOSE. In this way, the Assembly can be added to the PROJECT when the TREE is added.

In Options-> Document Options, click the Document Type drop-down menu on the top left, select C Source File, and add * in the File filter on the right *. s ,*. S can read the Assembly just like C.

From: ce123 Column

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.