New Keybindings in Editor
You can now enter insert mode using the full set of Vim keybindings:
iinsert at cursorainsert after cursor (append)Iinsert at first non-blank character of lineAinsert at end of lineoopen a new line below and enter insert modeOopen a new line above and enter insert modessubstitute (delete character under cursor and enter insert mode)Ssubstitute line (clear current line and enter insert mode)Cchange to end of line (delete from cursor to end and enter insert mode)
New lines opened with o/O automatically inherit the indentation of the current line. Substituted and changed text is copied to the clipboard.
Open Files in External Editor
Press g e to open the current file in your preferred external editor. The editor is resolved from environment variables in this order:
- RESTERM_EDITOR
- VISUAL
- EDITOR
Set any of those in you config and restem will respect that. Quoted arguments and escape sequences are supported (e.g. RESTERM_EDITOR="code --wait). The editor command works from the file list, navigator and editor panels - whichever item is currently selected. If you have unsaved changes, a warning is shown since the external editor opens the on-disk version.
Auto-Reload on External File Changes
Files that change on disk are now automatically reloaded when the Resterm buffer is clean (no unsaved edits). When the buffer has unsaved changes and the file changes externally, a modal dialog explains the conflict and lets you choose to reload (discarding local changes) or dismiss and keep editing. If a watched file is deleted from disk, a warning modal appears and the current buffer is preserved.
Thanks @dlvhdr for inputs!