Tuesday, January 8, 2013

Re: copy text in insert mode

On 01/08/13 07:05, vicky b wrote:
> hmm , there are few things which i find quiet inconvenient but other wise
> vim is superior to other editors ,

I forgot to mention that:

1) if you're running in X (rather than MacVim or on Win32), and
2) you don't have Vim set to intercept the mouse, and
3) the text you want to copy/paste is completely on the screen

you can select the text in your terminal window, and then paste the
selection buffer using

<c-r>*

all without leaving Insert mode. Granted, your hands leave the
home-row, but only you can decide whether that trade-off is worth
it. I, like many other Vimmers, tend to spend most of my time in
Normal mode, so I'm only ever in Insert mode for the insertion of
text and then I reflexively hit <esc> to return to Normal mode.
Drew Neil mentions this in his recently-released "Practical Vim"
(full disclosure: I was a tech reviewer for the book)

> once more such thing is like if i edit a characeter in each line
> then i have to edit the char go back to normal mode press j then
> edit and cycle repeats is there a any other way

I'm not sure I fully understand your edit cycle. If you're
replacing characters with the same character, you can do it once
with "r" in normal mode and then use the dot (".") command to repeat
it while moving around in normal mode. If there's a pattern to the
locations in which it happens, you may be able to use a :s///
command to locate them and change them accordingly (possibly using
the "c" flag to do them selectively).

You can also move around in Insert mode (or Replace mode if that
facilitates your editing) using the arrow-keys. It's not illegal,
just that it can be less efficient, so many people eschew using them.

For my basic understanding of your process, you'd hit "R" to go into
Replace mode, then type your letter, hit <down>, <left>, next
letter, repeat until done.

-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

No comments: