bitburner.userinterface.opencodeeditor.md
June 5, 2026 ยท View on GitHub
Home > bitburner > UserInterface > openCodeEditor
UserInterface.openCodeEditor() method
Opens the specified file(s) in the code editor.
Signature:
openCodeEditor(files?: string | string[], editorOptions?: EditorOptions): void;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
files |
string | string[] |
(Optional) Optional. The file(s) to open in the editor. If not provided, opens the editor to the last edited file, if any. |
|
editorOptions |
(Optional) Optional. Settings for opening the editor, such as |
Returns:
void
Remarks
RAM cost: 0 GB
This opens files from the server the script is running on, which may be different than the server the terminal is connected to.
Example
ns.ui.openCodeEditor("foo.js");
ns.ui.openCodeEditor(["bar.js", "data.json"], { vim: true });