Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 'edit-command-line' undesired behaviour



On 2/4/25 5:39 AM, Denis wrote:
Ehh, sorry for spam, noticed another mistake in my reasoning.

Replacing '*vim*' with 'vim' is also a half-baked solution, because it
would prevent custom relative/absolute paths of Vim and additional
option arguments in 'EDITOR' from falling under the Vim glob, and it
would fall under the general '*' glob. This solves the problem of
executable names that include 'vim' as part of their name from being
forced into this case, but the cursor positioning behaviour would be
inconsistent. Therefore, need more advanced regex/globs to account for
this.

Removing these special cases for Vim and Emacs entirely seems like the
simplest solution for consistent and fool-proof behaviour.

I find this regression undesirable, personally.

external utilities matching *(vim|emacs)* /and/ are a likely candidate for EDITOR/VISUAL, the
function transparently handles, like nvim. In the edge cases where that isn't desired, the editor
style can be used to override the behavior by the user.




Messages sorted by: Reverse Date, Date, Thread, Author