From: "Andy Bradford" Subject: Re: vi(1) issue with paragraph movement To: "Walter Alejandro Iglesias" Cc: tech@openbsd.org Date: 23 Apr 2026 22:35:17 -0600 Thus said Walter Alejandro Iglesias on Thu, 23 Apr 2026 15:12:12 +0200: > When you put the cursor in the last character of the last line (EOF) > and try to run a external command entering '!', vi does nothing. You > have to move the cursor back, at least to the penultimate character, > then it reacts. Technically, } is a motion command and if you are on the last character of the last line, then there is nowhere for it to move to. You'll see similar behavior if you do any of the following: !jfmt on the last line of a file !kfmt on the first line of a file !hfmt on the first character of a line Curiously enough, the following does actually seem to run the filter even though I wouldn't expect it to given the above 3 cases: !lfmt on the last character of a line I'm not sure that this is a bug or incorrect behavior, however, given that !lfmt works when you're on the last character of a line, there does seem to be some inconsistency. What should be done about those other cases where motion prevents ! from working because there is nowhere to go? > It's normal the case you're at the end of what you're editing, right? When I find myself at the end of what I'm editing I don't normally use a motion command to filter (why would I because there is nowhere for the motion to go), I use: :.!fmt Thanks, Andy