On 01/16/12 08:54, Eric Weir wrote:
This morning, working in a large text document, I realized
that all of a sudden all the upper case characters had been
converted to lowercase. It seems I accidentally issued a
command that has that effect. I believe at the time I had
caps-lock on, had forgotten that, and issued a commonly-used
command, probably a motion command, with it in effect.
Fortunately I had saved recently and was able to recover most
of the file from backup.

Sounds like you used gu<motion>. Alternatively, if you were in visual mode, you may have hit u to force the case change.

  :h gu
  :h gU
  :h v_u
  :h v_U
  :h v_~

And of course, if you hadn't reloaded the file and you had a sane setting for 'undolevels' (though sometimes this gets backed off for huge files), you could have just issued an undo. If you'd done other work since the incident, you might have been able to copy the entire document into a new one, undo back to before the case-change, diff the two windows, and then re-apply the changes from the pasted results.

-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

Reply via email to