创建一个Custom Command: ShellExecute open %d. 然后关联一个快捷键。
同理, 创建Custom Command: ShellExecute open "http://www.google.com/search?q=%w" 可以实现用Google搜索选中的词。
附:
SourceInsight (3.50.0064) Command Line Substitutions
The Run text box can contain meta-characters that cause the following items to be substituted in the string.
Character | Expands to | Example |
%f | full path name of the current file * | c:\myproj\file.c |
%r | path name of current file relative to the project source directory * | file.c |
%n | leaf name of the current file * | file.c |
%d | directory path of the current file | c:\myproj |
%h | directory path of current file without the drive letter | \myproj |
%b | leaf name of current file w/o extension * | file |
%e | extension of the current file | c |
%c | drive letter of the current file | c: |
%p | the current project name | c:\myproj\myproj |
%j | the source directory of the current project | c:\myproj |
%J | the data directory of the current project | C:\Documents and Settings\Jim Smith\My Documents\Source Insight\Projects\Base |
%v | the drive letter of the current project’s source directory | c: |
%o | leaf name of the project without path | myproj |
%l | the current line number | any number |
%w | first word in the selection, or the word under the cursor | any word |
%s | name of a temp file where the current selection is saved while the custom command runs. | d:\tmp\vt0004. |
%a | the current date | 05-12-02 |
%t | the current time | 08:23 |
%1 - %9 | user is prompted for arguments | any strings |
You can also postfix any of the above characters marked with * with either of the following modifier characters.
Character | Expands to | Example |
%o | for all open files | %f%o |
%m | for all modified files | %f%m |