SourceInsight使用

1. 突出效果

SourceInsight使用_第1张图片

按住alt+F12

SourceInsight使用_第2张图片

2. 点击变量或者方法,点击“jump to definition”,却提示“Symbol not found”
回答:随便打开一个文件,不要选择任何东西,也就是点击空白处,按F7,同步一下即可!

3. 选择ctrl+/进行多行注释:

将下面的代码拷贝到txt文件中,然后命名为”note.em“

macro MultiLineComment()
{
    hwnd = GetCurrentWnd()
    selection = GetWndSel(hwnd)
    LnFirst =GetWndSelLnFirst(hwnd)      //取首行行号
    LnLast =GetWndSelLnLast(hwnd)      //取末行行号
    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)  //取Ln对应的行
        if(buf ==""){                   //跳过空行
            Ln = Ln + 1
            continue
        }
        if(StrMid(buf, 0, 1) == "/"){       //需要取消注释,防止只有单字符的行
            if(StrMid(buf, 1, 2) == "/"){
               PutBufLine(hbuf, Ln, StrMid(buf, 2, Strlen(buf)))
            }
        }
        if(StrMid(buf,0,1) !="/"){          //需要添加注释
            PutBufLine(hbuf, Ln, Cat("//", buf))
        }
        Ln = Ln + 1
    }
    SetWndSel(hwnd, selection)
}

将它添加到工程里


然后在Options->KeyAssignments中你就可以看到这个宏了,宏的名字是MultiLineComments

SourceInsight使用_第3张图片


选中MultiLineComments,点击Assign new key 然后我们为它分配快捷键“Ctrl + /”(顺序按下ctrl 和 / ),然后就可以了

4.显示文件的全路径

从此状态


变成此状态


点击Option---Preference--Display

SourceInsight使用_第4张图片

将黄色底纹部分去掉勾选即可!



  




你可能感兴趣的:(SourceInsight使用)