Skip to content

Edit active document

Edit active document logo by KTrain5369

There is a 100,000 character limit for all editing actions.

See also: Reference/Cursor

Neuro gains her own cursor if she is allowed to edit the active document. This ensures that her activities won’t be disrupted by moving the real cursor.

This sends the current cursor position to Neuro, alongside surrounding lines as context.

This places Neuro’s virtual cursor at her desired spot. Once that is placed, she will also get her cursor’s surrounding lines as context.

Gets the contents of the entire file. The context sent will be more or less the same as the Send Current File as Context command.

This gives Neuro the ability to insert, replace, delete or find text within the active document.

Inserting will insert at Neuro’s cursor. For all other options, Neuro can choose to use either exact pattern searches or regex to search for the targeted text.

A special variant of the Insert Text action that automatically adds below a line rather than at the cursor. By default it inserts below the cursor.

Rewrites the specified range of lines with the given content and places the cursor at the end of the last inserted line.

Deletes the specified range of lines and moves the cursor to the end of the previous line.

Allows Neuro to highlight a set of lines. These lines will be displayed as pink highlights across the lines targeted. This is purely for attention-grabbing.

Completely rewrites the contents of the file and places the cursor at the start of the file.

This allows Neuro to undo the last editing action.

This allows Neuro to manually save the current document. This action is only registered if the autoSave setting is set to any value other than afterDelay.

In addition to being informed if she saved successfully, enabling Send Save Notifications will allow Neuro to receive save notifications as the active document is saved.

Gets the cursor of the current user.

Replaces the current user selection. If requireSelectionUnchanged is set to true and the selection was changed (or there is no selection info already stored), this requires that Neuro get the current user cursor’s context in some way first. This can be either with her Get User Cursor action or by sending it via the Send Current Selection as Context command.

Allows Neuro to write diff patches to modify the file. Intended as a more direct way of modifying the file.

Patches are written in a pseudo-search-replace-diff format. >>>>>> SEARCH and <<<<<< REPLACE are used to denote the text to search and text to replace. These are separated by ====== in the middle.

See the following example:

def turtle():
return "Vedal"

To apply a diff like this:

def turtle():
return "Vedal"
return "insert_turtle_here"

Neuro would need to write this patch:

>>>>>> SEARCH
def turtle():
return "Vedal"
======
def turtle():
return "insert_turtle_here"
<<<<<< REPLACE