You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the original vi, insert mode did not work like a non-modal editor: only characters inserted since entering insert mode could be deleted, and the cursor could not even be moved outside that range. Nearly all navigation and other edit operations therefore needed to be done in normal mode.
Analysis
Commuting through normal mode is annoying, compared to operating from within insert mode; however, it is faster, once it becomes habit. It's the same reason step #0 of a new Vim config is to disable arrow keys immediately. The less is possible in insert mode, the faster the user will ultimately become.
Proposal
A new configuration option, evil-fenced-insert or similar, that when enabled will bound the cursor within the range inserted since entering insert mode, and prevent characters outside that range from being deleted until insert mode ends. Additionally, will prevent any action invoked through C-o from reading or writing any characters outside that range, recursively.
Rationale
Someone more Emacsive than me attempted to achieve this feature in user config. The best solution they could muster was to place beginning and ending marks upon entering insert mode, move them as text is inserted, and adjust the behaviour of commands when between them vs not. Such a solution is maximally brittle, in that the literal entirety of Emacs must be specifically handled. Surely, a much cleaner and more robust solution is possible from within Evil itself.
The text was updated successfully, but these errors were encountered:
Context
In the original vi, insert mode did not work like a non-modal editor: only characters inserted since entering insert mode could be deleted, and the cursor could not even be moved outside that range. Nearly all navigation and other edit operations therefore needed to be done in normal mode.
Analysis
Commuting through normal mode is annoying, compared to operating from within insert mode; however, it is faster, once it becomes habit. It's the same reason step #0 of a new Vim config is to disable arrow keys immediately. The less is possible in insert mode, the faster the user will ultimately become.
Proposal
A new configuration option,
evil-fenced-insert
or similar, that when enabled will bound the cursor within the range inserted since entering insert mode, and prevent characters outside that range from being deleted until insert mode ends. Additionally, will prevent any action invoked throughC-o
from reading or writing any characters outside that range, recursively.Rationale
Someone more Emacsive than me attempted to achieve this feature in user config. The best solution they could muster was to place beginning and ending marks upon entering insert mode, move them as text is inserted, and adjust the behaviour of commands when between them vs not. Such a solution is maximally brittle, in that the literal entirety of Emacs must be specifically handled. Surely, a much cleaner and more robust solution is possible from within Evil itself.
The text was updated successfully, but these errors were encountered: