On 11/08/12 05:23, vicky b wrote: > I have started to learn vim in this modern enviroment where gui > takes prefers , one thing that still me back to other editors is > the ease with which we can copy and paste , can anybody help me > out with safe effect in vim or any thing of that sort
As others have mentioned, you might want to go through the vimtutor that is available when vim is installed. However, it's helpful to know that the "y"ank, "d"elete, "c"hange, and "s"ubstitute commands all alter the contents of "registers". The p/P commands are used to paste contents of those registers in Normal mode, and (as mentioned elsewhere, control+R can be used to insert register contents in Insert mode). These are lots of registers in vim, unlike Windows and Mac, where you usually only have one system clipboard. By default Vim operates on the unnamed register, so when you yank/delete/change/substitute, it puts the thing in this scratch register. By default when you paste, it uses this register. However, you can prefix the yank/delete/change/substitute/paste commands by naming the register you want to operate on, such as "by3w will yank 3 words into the "b" register, then "bp will paste the contents of the "b" register at some other location. You can list the contents of registers with the :reg command. There are registers for filenames, expression evaluation, most recent deletions, most recent yank, etc. If you want to interchange with other applications, you may be interested in the "system clipboard" register (or the "selection" register, if you're running on X/Linux/BSD) which is effectively what other applications will refer to as *the* clipboard. You *can* set 'clipboard' to include "unnamed" as one of its options, but after trying it for an afternoon, I found it drove me absolutely bonkers and I turned it right back off. Reading up at :help registers to learn LOTS more on them. -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
