-----Original Message----- From: Eric Leenman [mailto:[EMAIL PROTECTED] Sent: Sunday, March 25, 2007 3:40 PM To: vim@vim.org Subject: How to cut, copy and paste the VIM-way
Hi, I'm used to cut, copy and paste the windows-way. Meaning, selecting text and then press CTRL-X, CTRL-C or CTRL-V. In VIM (and correct me if I'm wrong) you yank (y) for copy put (p) for paste ..... for cut With this in mind, how to cut, copy and paste the VIM-way? Because when I select text and see select-mode in the lowest line and then press y, I see a letter y in my text and the selected text is gone. How come? Rgds, Eric _________________________________________________________________ Get a FREE Web site, company branded e-mail and more from Microsoft Office Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/ When you press y after selecting text you will replace the entire text with the y; this is because you are in the select mode. This is the kind of behaviour you would get in, lets say Notepad or most other editors. What you want is, to be in the visual mode before pressing y. There are two ways - 1. After selecting text (you can see a '---SELECT---' at the bottom of your screen.) press <CTRL-g>, that is '<Ctrl> + g' to toggle between visual and select mode. :h v_CTRL-G 2. Whenever you select text you can directly enter visual mode by default, instead of the select mode by setting the 'selectmode' options appropriately. :h selectmode Regards, Sibin DISCLAIMER: This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.