Command Line Options |
Command Line Options can be used to direct Boxer to position the text cursor specially upon startup, or to activate other modes or options.
Command Line Options must be preceded with a dash (-) or a forward slash (/). Options must be placed after the filename for which they are to be applied (see example below).
The most common use for Command Line Options is to configure Boxer as the external editor for another program. For example, many development environments offer the capability to define an external editor, and provide the ability to pass that editor a starting line and/or column number. The exact syntax to achieve this integration will vary from program to program, so please consult the program's documentation.
Command Line Options
-C<value> This option can be used to position the text cursor at a specified column number. The column number is specified immediately following the C, in decimal format. See examples below at the -L option flag.
-G This option can be used to disable display of Boxer's splash screen graphic upon startup.
-H This option can be used to request that the next-named file on the command line be opened in read-only hex mode. If more than one file must be opened in hex mode, precede each such filename with the option flag:
b -H file1.txt -H file2.txt
-K<keyboard filename> Load the named keyboard layout at startup. The filename is placed immediately adjacent to the K, without an intervening space.
-L<value> This option can be used to position the text cursor at a specified line number. The line number is specified immediately following the L, in decimal format.
Example: to place the text cursor on line 214, column 35 the following command line could be used:
b myproj.cpp -L214 -C35
When multiple files are named, place the option flags after the filename to which they apply:
b myproj.cpp -L214 -C35 main.cpp -L505 -C18
-M<macro filename> Run the named macro file. The macro name is placed immediately adjacent to the M. If the macro operates on a text file, the file to be processed should appear to the left of the -M option flag so it will be opened at the time the macro is run. If two or more macros are to be applied to a single file, use -M repeatedly for each macro:
b file.txt -Mmacro1.bm -Mmacro2.bm
-P<project filename> Open the named project file. The project name is placed immediately adjacent to the P. If a filepath is not supplied, the file will be opened from the Projects directory. For complete information about project files, see the Project | New command.
-Q This option can be used to force Boxer into quiet mode. All use of sound will be disabled for the current editing session, and for all future sessions. Sounds can be enabled on the Configure | Preferences | Messages options page.
-R <filename> Open the next file that appears on the command line in read-only mode.
-S<text> This option can be used to position the text cursor at the first occurrence of the specified search string. The search string is entered immediately following the S. Regular Expressions are not permitted in this context; the search performed is a simple text search.
Example: to place the text cursor at the first occurrence of the word 'porcelain' the following command line could be used:
b oldsigns.txt -Sporcelain
-T<tab settings> <filename> Specify tab settings for the next file, and all other files named on the command line. If a single value 'n' is present, fixed width tabs of size 'n' will be used. If a comma-delimited list of values is present, variable width tab stops will be assigned at the designated columns. Command line tab settings take precedence over default tab settings, and over tab settings specified in Syntax.ini.
Example 1: open the named files with a fixed width tab size of 8:
b -T8 file1.txt file2.txt
Example 2: open the named file with tab stops at the columns indicated:
b -T4,12,22,30,44,60 orders.dat
-W0 Turn Word Wrap off for the immediately preceding filename. The following command line will turn off Word Wrap for file1.txt, but not for file2.txt.
b file1.txt -W0 file2.txt
-W1 Turn Word Wrap on for the immediately preceding filename. The following command line will turn on Word Wrap for file1.txt, but not for file2.txt.
b file1.txt -W1 file2.txt
-1 Force filenames to be added to an existing session, regardless of the current setting for Multiple Instances. The option can appear anywhere on the command line, and applies to all files on the command line.
-2 Force filenames to be opened in a new session, regardless of the current setting for Multiple Instances. The option can appear anywhere on the command line, and applies to all files on the command line.
-? This option causes a pop-up window to appear that displays all of Boxer's command line options:
Wildcard Expressions Boxer supports the use of wildcard expressions to match an entire class of files. All files matched by the wildcard expression will be opened for editing. The use of the asterisk (*) and question mark (?) are supported. For example, to edit all files in the current directory with a .cpp file extension, the following command line could be used:
b *.cpp
To edit all files named report with a single character file extension, use this wildcard expression:
b report.?
|