-
-
Notifications
You must be signed in to change notification settings - Fork 118
Command line interface
This will cover how to start Ox from your command line and the options you can use to launch Ox in a specific way.
You can access the help menu by running
ox --helpThis will display the help menu and provide a list of all the arguments available.
Ox can be started up by using the command
oxThis will launch Ox into a blank document, ready to be edited.
You can open files by providing the names like so:
ox file.rsThis will automatically open up the file file.rs
You can also open multiple files at once.
ox file1.rs file2.rs file3.rsAfter running this, you'll see all your files (file1.rs, file2.rs, file3.rs in this case) opened in tabs across your screen.
You can check your version by running
ox --versionYou can also change the configuration directory by running
ox --config /path/to/configuration.ronThe editor will read a specific configuration file on your system.
In versions above 0.2.7, you can use a handy trick from the command line to jump to a specific location in the file. You can do this by formatting your files like this:
ox file.txt:100This above will open file.txt and automatically go to the 100th line in the file
Here's another example:
ox file.txt:100:10This is another format in where it will open up file.txt and jump to the 100th line and 10th character across.
In general, the format of this feature is as follows:
ox FILENAME:LINE:CHARACTERAlso in 0.2.7 and above, you can access a read only mode by providing the -r argument
ox -r file.txtThis will open file.txt in read only mode. This means that you will not be able to edit the file.