A difference in behaviour between :g and :<range>normal recently frustrated me, and I wonder if it's up for debate:
:g does a pass on matching lines and marks them before performing the operation; this allows it to be generally undeterred by operations that include addition/deletion of lines. :<range>normal does not do this, and as a result, it can get "thrown off" by such operations. For (a trivial) example, on the hypothetical file: foo bar baz Performing :1,3normal yyp would produce the following result: foo foo foo foo bar baz Whereas the more intuitive result would be: foo foo bar bar baz baz There does exist a workaround, in the form of :<range>g/^/normal yyp -- simply using :g in a way guaranteed to match every line in the desired range -- but this is a bit of a compositional kludge. Would it be feasible to add the marking behaviour of :g to :normal, or is that not worth implementing / a feature? -- -- You received this message from the "vim_dev" 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_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.