euporie.core.key_binding.bindings.micro
Define editor key-bindings and commands for the micro editing mode.
Functions
|
Accept the line regardless of where the cursor is. |
|
Accept suggestion. |
|
Add a command to the centralized command system. |
|
Delete the character behind the cursor. |
|
Delete the word behind the cursor, using whitespace as a word boundary. |
|
Move back to the start of the current or previous word. |
|
Move to the start of the buffer. |
|
Cancel the selection. |
Add the current selection to the clipboard. |
|
|
Remove the current line adds it to the clipboard. |
Remove the current selection and adds it to the clipboard. |
|
|
Delete character before the cursor. |
Delete the contents of the current selection. |
|
|
Indent or unindent the current or selected lines in a buffer. |
Duplicate the current line. |
|
Duplicate the current selection. |
|
Stop recording a macro. |
|
|
Move to the end of the buffer. |
|
Add a new member to an existing Enum. |
|
Extend the selection. |
|
Fill partial suggestion. |
|
Move forward to the end of the next word. |
|
Get the current active (running) Application. |
|
Return the handler for the (Readline) command with the given name. |
|
Get a command from the centralized command system by name. |
Move the cursor to the end of the line. |
|
Move the cursor to the end of the current paragraph. |
|
|
Go to matching bracket if the cursor is on a paired bracket. |
Move the cursor to the start of the line. |
|
Move the cursor to the start of the current paragraph. |
|
|
Return True when the previous event was delivered to another handler. |
|
Indent text of a |
|
Inndent the current or selected lines. |
|
Load editor key-bindings in the style of the |
|
Assign key-bindings to commands based on a dictionary. |
Move back a character, or up a line. |
|
Move forward a character, or down a line. |
|
|
Move the current or selected lines up or down by one or more lines. |
Move the current or selected lines down by one line. |
|
Move the current or selected lines up by one line. |
|
|
Inert a new line, replacing any selection and indenting if appropriate. |
Pate the clipboard contents, replacing any current selection. |
|
|
Redo the last edit. |
|
Update the key-binding registry. |
|
Replace selection by what is typed. |
Re-execute the last keyboard macro defined. |
|
|
Scroll window up. |
|
Scroll window down. |
|
Same as ControlF, but only scroll half a page. |
|
Same as ControlB, but only scroll half a page. |
|
scroll_offset += 1 |
|
scroll_offset -= 1 |
Select all text. |
|
Start recording a macro. |
|
|
Start a new selection. |
Toggle the case of the current word or selection. |
|
Comment or uncomments the current or selected lines. |
|
Toggle overwrite when using micro editing mode. |
|
|
Undo the last edit. |
|
Unindent text of a |
|
Unindent the current or selected lines. |
|
Handle keys in shift selection mode. |
|
Add strings to either end of the current selection. |
Classes
|
Wraps around a KeyBindings. Disable/enable all the key bindings according to the given (additional) filter.::. |
|
This is a immutable class around the text and cursor position, and contains methods for querying this data, e.g. |
|
Micro style editor key-bindings. |
|
|
|
List of keys for use in key bindings. |
|
Enum to define edit mode state types. |
|
State of the current selection. |
|
Type of selection. |
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_selection() None
Duplicate the current selection.
- euporie.core.key_binding.bindings.micro.extend_selection(event: KeyPressEvent) None
Extend the selection.
- euporie.core.key_binding.bindings.micro.fill_suggestion(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.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.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.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