News for hackers. Stuff that matters.
Re:Vim is hard, I just want to click around by gbog on Monday September 05, 2011 @09:52AM (#2962184)
> don't give up

Yes. All the tutos I have read recently insist on using hjkl, which is a matter of taste, but do not emphasize what I believe is the most important (for terminal use): cut and paste.

- Easy cut and paste in Vim is done with yy and p, avoid mouse and ctrl-c/v or any other trick that is not "inside" Vim.

- Good trick are to first select a block with <shift-V>.

- Don't forget P, which is pasting above current line or before cursor, often more logical than p.

- This implies to open different files inside the same Vim instance, using :Explore or :edit

- If you have to copy some outside text inside Vim, by all means, use the paste mode (:set paste), if you don't you'll mess up your text.

Re:Vim is hard, I just want to click around by shadowfiend on Monday September 05, 2011 @10:59AM (#2962376)
Also worth remembering is that every command that deletes really cuts. Which is to say, deletion commands like x and dd store the deleted content in the register that will be used when you hit p or P. This is important to know both because it can be very useful sometimes and because it can get in your way other times (e.g., if you're trying to repeat an action and keep replacing a line with another line, you'll have to paste before you delete so you don't override your register).
Re:Vim is hard, I just want to click around by graywh on Monday September 05, 2011 @12:33PM (#2962651)
Or you can specify the register name. Don't limit yourself to the unnamed register.
Re:Vim is hard, I just want to click around by shadowfiend on Monday September 05, 2011 @02:21PM (#2962953)
Absolutely. My fault for not mentioning it :)
Re:Vim is hard, I just want to click around by johncoltrane on Monday September 05, 2011 @04:48PM (#2963313)
vnoremap <leader>p "_dP

"_ is the blackhole register, with this the replaced text disappears and you can continue "putting" the new text at will.

Re:Vim is hard, I just want to click around by damienfir on Monday September 05, 2011 @11:48AM (#2962514)
Thanks, I didn't know about the paste mode.
[deleted]
Re:Vim is hard, I just want to click around by oinksoft on Monday September 05, 2011 @10:01AM (#2962204)
I'm not sure what you're saying, but dd is cut line.