On 01/16/12 12:04, Eric Weir wrote:
On Jan 16, 2012, at 10:05 AM, Tim Chase wrote:
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_~

Thanks, Tim--and to everyone else who responded. My guess is
it was hitting u while in visual mode. I have not advanced to
the stage of using commands beginning with a g or a v. I'll
check out the ones you suggest.

well, the "v" ones are ones done in visual mode, which it sounds like you're already using. Pressing u/U/~/? in visual mode transform the selection accordingly (lowercasing, uppercasing, swap-casing, and ROT13ing). The other "g" variants perform the same transformations over the text covered by <motion>

"diff" is one of those things I hear about here that I haven't
gotten around to checking out, yet. Likewise with "grep". I've
assumed they're more relevant to programmers, which I
definitely am not. But as you suggest with "diff," I'm pretty
certain that even programmers' tools can be put to good use in
plain old writing--if you've gone to the trouble of finding
out about them.

"diff"ing just means comparing two files. For code, the standard diff occurs line-wise, and Vim has great support for this. To try it out, take a file, edit it and save it to a different name. Then start vim with

  vimdiff orig_file.txt modified_file.txt

(or "vim -d orig_file.txt modified_file.txt", or issue ":diffthis" in each of two existing windows/buffers you want to compare). You might want to walk through

  :help diff.txt

and try out what you see in there with two mostly-the-same junk files you have floating around. The most helpful things to know are the dp/dg (or ":diffput" and ":diffget" commands) for moving changes between the two files.

As discussed recently in a parallel thread, if you have flowing text where paragraphs are reflowed inserting linebreaks (rather than your paragraphs being all on one line), it's not quite as useful. For that, you might investigate "wdiff" to compare the files.

-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