On Thu, January 23, 2014 15:48, Christian Wellenbrock wrote: > On Thursday, January 23, 2014 7:49:33 AM UTC+1, Ben Fritz wrote: >> On Thursday, January 23, 2014 12:10:32 AM UTC-6, Anton Shemerey wrote: >> > Recently i made a mistake, and wrote following command, for selected >> text, and editor just disappear >> > >> > i've tried it for bought vim, and macvim with -u NONE and it looks >> like you can easily reproduce it >> > >> > * open any file, (it should not be empty buffer) >> > * select something >> > * go to command mode and type following: >> > '<,'>x?^\s*def >> >> That's because the :x command is a synonym for :wq (with the difference >> that it doesn't save if there are no changes). >> >> You just told Vim very explicitly, to save and quit. So Vim did just >> that. > > Interestingly `:'<,'>q` complains about `E481: No range allowed`. So maybe > it would be more consistent to show the same error when attempting > `:'<,'>x`.
But :x writes the file and only then quits and it makes sense to allow giving a range to the :x (or :w or :wq) command (to be able to specify a range which is to be written). Best, Christian -- -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
