Tuesday, September 22, 2026

Re: No error with ]s when nowrapscan?

On 2026-09-22 22:06, Doug Kearns wrote: > > $ vim one.txt two.txt three.txt > > :set hidden nowrapscan > > > > I then repeatedly issued > > > > :try | exec 'norm ]s' | catch | n | endtry > > > > (using @: then subsequently @@ makes this easy) which worked for > > finding all the misspelled words in the *first* file, but after > > finding the last one in that file, the ]s *should* fail because > > there is no "next" bad-spelling in the current file and wrapscan is > > off. So it seems like the ]s *should* have thrown an exception, get > > caught, and then go to the :next file instead where the process can > > repeat. But it seems to silently swallow the "no more bad spellings > > in the current file" without letting me catch the condition. [snip] > You could leverage temporary use of `:set debug=beep`. A promising proposition, but I'm not sure that's working for me? I tried the your suggestion with each of debug=beep debug=throw debug=throw,beep but none of them change the behavior of the ]s (not) throwing an error to get caught. I do see "Beep!" text at the bottom of my screen when I expect the exception/catch, but no catchable error seems to happen. -tim -- -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_use/arJ3qtqAZvkO2pNO%40thechases.com.

No comments: