James G. Sack (jim) wrote:
Ralph Shumaker wrote:
Stewart Stremler wrote:
begin quoting Ralph Shumaker as of Sun, Mar 18, 2007 at 10:36:52PM
-0700:
[snip]
Now for a vim question. (I've gotten better with vim. I even
discovered (by accident) command history.)
In vim, how do you cut and paste? I like the function of "dd" to
vaporize a line and "9d" to vaporize 9 lines (and so on). But can I
delete one line (or more) and paste it somewhere else? How about
copy and paste? (This would make vim *far* more useful to me.)
The command "p" will paste the cut buffer (or unnamed register) after the
cursor, and "P" will paste before.
The "d" command deletes lines and puts 'em into the cut buffer.
The "y" command copies lines into the cut buffer.
In edit mode, control-V selects a rectangular region, and shift-V
selects whole lines. You can use these to copy or move text.
You can put data into/from a named register if you want to hang on to
several different deletes/copies.
Have you found out about marking yet?
LOL, not yet. I've heard that vim is a behemoth to learn, but also that
you don't need to know much of it to be useful. I've scratched the
surface (although you would have to use a microscope to see the scratch).
Thanks for the tip about vimtutor. I just fired it up. I haven't gone
anywhere with it yet. But I shall. (The problem with man vim (or is it
info vim?) is that it's like being handed a car repair manual that is
*not* bound.
HahHah! Good analogy.
You _may_ get /some/ value out of the online help in the gui version (gvim).
If you don't have gvim, you can install the vim-X11 package.
I didn't know I had that. It looks kinda kool! Thanks.
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list