[Transferred from ce123] some tips on source insight

Source: Internet
Author: User
Tags tortoisesvn

From http://blog.csdn.net/ce123/article/details/6860738

Author: ce123

 

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 you need to add again after adding *. S.
Tree once 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 you need to install and manage SVN.

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.

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.