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? -- Really, vimtutor is a useful training tool. Stewart Stremler -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
