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
If I use V, then hit j to select two lines, followed by zf, it folds 3 lines. This differs from vim, which will only fold 2. I'm guessing this happens because as far as the range is concerned, I think emacs considers the point to be at the beginning of the next line and, in emacs mode, vimish-fold assumes you want to fold the line that includes the point. This seems perhaps wrong, but I wanted to check in here first to see if that's known, I've got some configuration issue, or something else.
Thanks!
The text was updated successfully, but these errors were encountered:
This is really old but I racked my brain trying to get a fix. I think this has something to do with certain evil-mode configurations which lend to visual mode consuming the final newline character of a region during line-selection.
You may have noticed that standard visual selection leads to no issues.
A way to fix this is to wrap your calls to vimish-fold with a condition which decrements the endpoint if the region happens to end in a newline character. Here is my use-package config, just take the zig/vimish-fold-region function and adapt it as you need.
I also found this in the evil-mode documentation, although this did not work in my case and I believe that this is because it again does not account for the newline character consumption in LINE selection mode.
evil-v$-excludes-newline
If non-nil, evil-end-of-line does not move as far as to include the `` `` char at eol. This makes v$ consistent with $ used as a motion (e.g. v$y is consistent with y$ in normal state).
If I use
V
, then hitj
to select two lines, followed byzf
, it folds 3 lines. This differs from vim, which will only fold 2. I'm guessing this happens because as far as the range is concerned, I think emacs considers the point to be at the beginning of the next line and, in emacs mode, vimish-fold assumes you want to fold the line that includes the point. This seems perhaps wrong, but I wanted to check in here first to see if that's known, I've got some configuration issue, or something else.Thanks!
The text was updated successfully, but these errors were encountered: