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
I am using (g)Vim 9.0 and the GrepOperator function of chapter 34, first scriptdoesn't work properly with a yank movement (line 10 of the script): This movement to `] is exclusive in my Vim application. Thus, it doesn't contain the last character of the target of the movement.
Toggling exclusive movement to inclusive
I don't know whether there is an option to switch it permanently to an inclusive movement, but I fixed the issue with inserting a v after the yank:
" My fix in line 10 of GrepOperator function:
normal! `[yv`]
The v toggles a normally exclusive movement to an inclusive one (see: :help o_v in Vim).
Thanks!
And by the way: Thank you for publishing that tutorial! After 30 years of using Vim occasionally with only knowing a few commands, I will now become a professional (hopefully). It is incredible how long it lasts sometimes to learn something important fundamentally.
Link: https://learnvimscriptthehardway.stevelosh.com/chapters/34.html
The text was updated successfully, but these errors were encountered: