euporie.core.key_binding.bindings.micro

Define editor key-bindings and commands for the micro editing mode.

Functions

accept_line(event)

Accept the line regardless of where the cursor is.

accept_suggestion(event)

Accept suggestion.

add_cmd(**kwargs)

Add a command to the centralized command system.

backward_delete_char(event)

Delete the character behind the cursor.

backward_kill_word(event)

Delete the word behind the cursor, using whitespace as a word boundary.

backward_word(event)

Move back to the start of the current or previous word.

beginning_of_buffer(event)

Move to the start of the buffer.

cancel_selection(event)

Cancel the selection.

copy_selection()

Add the current selection to the clipboard.

cut_line()

Remove the current line adds it to the clipboard.

cut_selection()

Remove the current selection and adds it to the clipboard.

delete_char(event)

Delete character before the cursor.

delete_selection()

Delete the contents of the current selection.

dent_buffer(event[, indenting])

Indent or unindent the current or selected lines in a buffer.

duplicate_line()

Duplicate the current line.

duplicate_selection()

Duplicate the current selection.

end_macro()

Stop recording a macro.

end_of_buffer(event)

Move to the end of the buffer.

extend_enum(enumeration, name, *args, **kwds)

Add a new member to an existing Enum.

extend_selection(event)

Extend the selection.

fill_sugestion(event)

Fill partial suggestion.

forward_word(event)

Move forward to the end of the next word.

get_app()

Get the current active (running) Application.

get_by_name(name)

Return the handler for the (Readline) command with the given name.

get_cmd(name)

Get a command from the centralized command system by name.

go_to_end_of_line()

Move the cursor to the end of the line.

go_to_end_of_paragraph()

Move the cursor to the end of the current paragraph.

go_to_matching_bracket(event)

Go to matching bracket if the cursor is on a paired bracket.

go_to_start_of_line()

Move the cursor to the start of the line.

go_to_start_of_paragraph()

Move the cursor to the start of the current paragraph.

if_no_repeat(event)

Return True when the previous event was delivered to another handler.

indent(buffer, from_row, to_row[, count])

Indent text of a Buffer object.

indent_lines(event)

Inndent the current or selected lines.

load_micro_bindings([config])

Load editor key-bindings in the style of the micro text editor.

load_registered_bindings(*names[, config])

Assign key-bindings to commands based on a dictionary.

move_cursor_left()

Move back a character, or up a line.

move_cursor_right()

Move forward a character, or down a line.

move_line(n)

Move the current or selected lines up or down by one or more lines.

move_lines_down()

Move the current or selected lines down by one line.

move_lines_up()

Move the current or selected lines up by one line.

newline(event)

Inert a new line, replacing any selection and indenting if appropriate.

paste_clipboard()

Pate the clipboard contents, replacing any current selection.

redo()

Redo the last edit.

register_bindings(bindings)

Update the key-binding registry.

replace_selection(event)

Replace selection by what is typed.

run_macro()

Re-execute the last keyboard macro defined.

scroll_backward(event[, half])

Scroll window up.

scroll_forward(event[, half])

Scroll window down.

scroll_half_page_down(event)

Same as ControlF, but only scroll half a page.

scroll_half_page_up(event)

Same as ControlB, but only scroll half a page.

scroll_one_line_down(event)

scroll_offset += 1

scroll_one_line_up(event)

scroll_offset -= 1

scroll_page_down(event)

Scroll page down.

scroll_page_up(event)

Scroll page up.

select_all()

Select all text.

start_macro()

Start recording a macro.

start_selection(event)

Start a new selection.

toggle_case()

Toggle the case of the current word or selection.

toggle_comment()

Comment or uncomments the current or selected lines.

toggle_overwrite_mode()

Toggle overwrite when using micro editing mode.

undo()

Undo the last edit.

unindent(buffer, from_row, to_row[, count])

Unindent text of a Buffer object.

unindent_lines(event)

Unindent the current or selected lines.

unshift_move(event)

Handle keys in shift selection mode.

wrap_selection_cmd(left, right)

Add strings to either end of the current selection.

Classes

ConditionalKeyBindings(key_bindings[, filter])

Wraps around a KeyBindings. Disable/enable all the key bindings according to the given (additional) filter.::.

Document([text, cursor_position, selection])

This is a immutable class around the text and cursor position, and contains methods for querying this data, e.g.

EditMode()

Micro style editor key-bindings.

EditingMode(value[, names, module, ...])

Keys(value[, names, module, qualname, type, ...])

List of keys for use in key bindings.

MicroInputMode(value[, names, module, ...])

Enum to define edit mode state types.

SelectionState([original_cursor_position, type])

State of the current selection.

SelectionType(value[, names, module, ...])

Type of selection.

partial

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.

class euporie.core.key_binding.bindings.micro.EditMode

Bases: object

Micro style editor key-bindings.

euporie.core.key_binding.bindings.micro.accept_suggestion(event: KeyPressEvent) None

Accept suggestion.

euporie.core.key_binding.bindings.micro.backward_kill_word(event: KeyPressEvent) None

Delete the word behind the cursor, using whitespace as a word boundary.

euporie.core.key_binding.bindings.micro.cancel_selection(event: KeyPressEvent) None

Cancel the selection.

euporie.core.key_binding.bindings.micro.copy_selection() None

Add the current selection to the clipboard.

euporie.core.key_binding.bindings.micro.cut_line() None

Remove the current line adds it to the clipboard.

euporie.core.key_binding.bindings.micro.cut_selection() None

Remove the current selection and adds it to the clipboard.

euporie.core.key_binding.bindings.micro.delete_selection() None

Delete the contents of the current selection.

euporie.core.key_binding.bindings.micro.dent_buffer(event: KeyPressEvent, indenting: bool = True) None

Indent or unindent the current or selected lines in a buffer.

euporie.core.key_binding.bindings.micro.duplicate_line() None

Duplicate the current line.

euporie.core.key_binding.bindings.micro.duplicate_selection() None

Duplicate the current selection.

euporie.core.key_binding.bindings.micro.end_macro() None

Stop recording a macro.

euporie.core.key_binding.bindings.micro.extend_selection(event: KeyPressEvent) None

Extend the selection.

euporie.core.key_binding.bindings.micro.fill_sugestion(event: KeyPressEvent) None

Fill partial suggestion.

euporie.core.key_binding.bindings.micro.go_to_end_of_line() None

Move the cursor to the end of the line.

euporie.core.key_binding.bindings.micro.go_to_end_of_paragraph() None

Move the cursor to the end of the current paragraph.

euporie.core.key_binding.bindings.micro.go_to_matching_bracket(event: KeyPressEvent) None

Go to matching bracket if the cursor is on a paired bracket.

euporie.core.key_binding.bindings.micro.go_to_start_of_line() None

Move the cursor to the start of the line.

euporie.core.key_binding.bindings.micro.go_to_start_of_paragraph() None

Move the cursor to the start of the current paragraph.

euporie.core.key_binding.bindings.micro.indent_lines(event: KeyPressEvent) None

Inndent the current or selected lines.

euporie.core.key_binding.bindings.micro.load_micro_bindings(config: Config | None = None) KeyBindingsBase

Load editor key-bindings in the style of the micro text editor.

euporie.core.key_binding.bindings.micro.move_cursor_left() None

Move back a character, or up a line.

euporie.core.key_binding.bindings.micro.move_cursor_right() None

Move forward a character, or down a line.

euporie.core.key_binding.bindings.micro.move_line(n: int) None

Move the current or selected lines up or down by one or more lines.

euporie.core.key_binding.bindings.micro.move_lines_down() None

Move the current or selected lines down by one line.

euporie.core.key_binding.bindings.micro.move_lines_up() None

Move the current or selected lines up by one line.

euporie.core.key_binding.bindings.micro.newline(event: KeyPressEvent) None

Inert a new line, replacing any selection and indenting if appropriate.

euporie.core.key_binding.bindings.micro.paste_clipboard() None

Pate the clipboard contents, replacing any current selection.

euporie.core.key_binding.bindings.micro.redo() None

Redo the last edit.

euporie.core.key_binding.bindings.micro.replace_selection(event: KeyPressEvent) None

Replace selection by what is typed.

euporie.core.key_binding.bindings.micro.run_macro() None

Re-execute the last keyboard macro defined.

euporie.core.key_binding.bindings.micro.select_all() None

Select all text.

euporie.core.key_binding.bindings.micro.start_macro() None

Start recording a macro.

euporie.core.key_binding.bindings.micro.start_selection(event: KeyPressEvent) None

Start a new selection.

euporie.core.key_binding.bindings.micro.toggle_case() None

Toggle the case of the current word or selection.

euporie.core.key_binding.bindings.micro.toggle_comment() None

Comment or uncomments the current or selected lines.

euporie.core.key_binding.bindings.micro.toggle_overwrite_mode() None

Toggle overwrite when using micro editing mode.

euporie.core.key_binding.bindings.micro.undo() None

Undo the last edit.

euporie.core.key_binding.bindings.micro.unindent_lines(event: KeyPressEvent) None

Unindent the current or selected lines.

euporie.core.key_binding.bindings.micro.unshift_move(event: KeyPressEvent) None

Handle keys in shift selection mode.

When called with a shift + movement key press event, moves the cursor as if shift is not pressed.

Parameters

event – The key press event to process

euporie.core.key_binding.bindings.micro.wrap_selection_cmd(left: str, right: str) None

Add strings to either end of the current selection.