The following options may be included on the Source Insight command line.
-i <rest of command line>
This option will direct the rest of the command line to an already running instance of Source Insight, if any. If there are no instances already running, then a new instance is started.
sourceinsight4 –i myfile.cpp
This will locate an already running instance of Source Insight, and tell it to open myfile.cpp.
-ni <rest of command line>
This option will start a new instance of Source Insight, even if one is already running.
sourceinsight4 -ni myfile.cpp
Normally, if you invoke Source Insight with one or more file name on the command line, and another instance of Source Insight is already running, then the files will open in the existing instance of Source Insight. A new Source Insight instance is not launched. This option forces a new instance to launch.
This option will start Source Insight, and run the specified command. The command can be a built-in command, or a defined custom command, or a macro command.
To invoke a macro command, use the name of the macro function, but do not include parentheses. There is no way to pass parameters to a macro function from the command line. For example:
sourceinsight4 -c MyMacroFunction
This option closes the current project, if any, and opens the project given in project-name. If the project does not exist, Source Insight will give an error message.
sourceinsight4 -p myproj
This option closes the current project if one is open. No other project is opened.
This option closes the current project, if any, and opens the project given in projectname. Unlike the -p option, the next time you run Source Insight, the old current project is opened. This is useful if you want to put a Source Insight command in a batch file, but don't want the current project to be changed.
sourceinsight4 -pt mail
This option locates the symbol given in symbol_name, opens that file, and positions the insertion point on the symbol. If the symbol can't be found, Source Insight will give an error message. This is unlike specifying a symbol in place of a file name because this explicitly tells Source Insight that you are looking for a parsed symbol, not a file.
sourceinsight4 -f DoIdle
This option updates all project files right away when Source Insight starts. It is exactly like using the Synchronize Files command on the Project menu.
This option is like -u except that Source Insight quits after the files are updated. This is useful for putting a command in a batch file to synchronize Source Insight projects.
This option turns off the Source Insight splash screen that normally appears when starting up.
-d <file1> <file2>
This option open the File Compare window and compares the two given files. See: File Compare.
This option tells Source Insight to reset all optional settings: the configuration, the layout, and any session information. You will be prompted and asked which things you want to reset.
This option tells Source Insight to reset all optional settings in the configuration. This includes things like the color settings, styles, key bindings, and all options set on the Options menu.
This option tells Source Insight to reset the window layout to defaults.