Hot search terms: 360 Security Guard Office365 360 browser WPS Office iQiyi Huawei Cloud Market Tencent Cloud Store
programming tools Storage size: 22.8 MB Time: 2022-03-25
Software introduction: Source Insight is a program editor and code browser for project development, which can support multiple languages such as C/C++ or Java, and...
Many people don’t know how Source Insight annotates multiple lines of code? The article brought to you today is Source If you still don’t know how Insight comments multiple lines of code, let’s learn it with the editor.
The first step: First we open Source Insight, [Project]---[Open Project], open the base project (as shown in the picture).
Step 2: Then add the following code to the utils.em code:
macro MultiLineComment() { hwnd = GetCurrentWnd() selection = GetWndSel(hwnd) LnFirst = GetWndSelLnFirst(hwnd) //Get the first line number LnLast = GetWndSelLnLast(hwnd) //Get the last line number hbuf = GetCurrentBuf() if(GetBufLine(hbuf, 0) == "//magic-number:tph85666031"){ stop } Ln = Lnfirst buf = GetBufLine(hbuf, Ln) len = strlen(buf) while(Ln <= Lnlast) { buf = GetBufLine(hbuf, Ln) //Get the line corresponding to Ln if(buf == ""){ //Skip empty lines Ln = Ln + 1 continue } if(StrMid(buf, 0, 1) == "/") { //Need to uncomment to prevent lines with only single characters if(StrMid(buf, 1, 2) == "/"){ PutBufLine(hbuf, Ln, StrMid(buf, 2, Strlen(buf))) } } if(StrMid(buf,0,1) != "/"){ //Need to add comments PutBufLine(hbuf, Ln, Cat("//", buf)) } Ln = Ln + 1 } SetWndSel(hwnd, selection) }
Step 3: Then click [Options]---[Menu Assignment], and select the macro you just added in the command bar MultiLineComment, just select the menu that is convenient for you to operate in the menu bar. Generally, select Work and click Insert (as shown in the picture).
Step 4: After clicking OK, the work menu will be displayed in the menu bar, and it will be available in the work menu drop-down list. When using MultiLineComment in the future, select the line to be commented and click the label to comment it out (as shown in the figure).
The above is the entire content of how Source Insight annotates multiple lines of code brought to you by the editor. I hope it can help you.
How to update the version of 360 Speed Browser-How to update the version of 360 Speed Browser
How to turn on the speed mode of 360 Speed Browser - How to turn on the speed mode of 360 Speed Browser
How to turn off ads in 360 Speed Browser - How to turn off ads in 360 Speed Browser
How to download recorded videos in obs? -How to download and record videos in obs
How to clear the cache of 360 Speed Browser - How to clear the cache of 360 Speed Browser
What to do if there is no sound after reinstalling the computer system - Driver Wizard Tutorial
How to practice typing with Kingsoft Typing Guide - How to practice typing with Kingsoft Typing Guide
How to upgrade the bootcamp driver? How to upgrade the bootcamp driver
How to change QQ music skin? -QQ music skin change method
Driver President Download-How to solve the problem when downloading driver software is very slow