Skip to content

Latest commit

 

History

History
84 lines (41 loc) · 1.25 KB

File metadata and controls

84 lines (41 loc) · 1.25 KB

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

EditorOptions

(Optional) Optional. Settings for opening the editor, such as vim mode

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 });