Troy Piggins wrote:
I use 'R' replace mode when doing, for example, ascii art etc
because it allows me to change characters without affecting the
layout of the rest of the window/page.
But if I want to yank a section using visual or visual block, is
there a way to put 'p' that block in without affecting the
layout? The way I've been doing it, the rest gets pushed along.
The DrawIt plugin supports this sort of thing. Here's the procedure:
visual-block select some region and save into register a (ctrl-v move "ay)
move cursor (upper left hand corner based) : \pa
or, move cursor and click shift-leftmouse
Actually, DrawIt supports \pa ... \pz for all 26 marks, and that's a
space-transparent put.
If you want the spaces to be used, use \ra ... \rz.
To get an up-to-date version of DrawIt, you'll also need to get an
up-to-date version of vimball. So:
1) Get an up-to-date version of vimball:
http://vim.sourceforge.net/scripts/script.php?script_id=1502
-or- http://mysite.verizon.net/astronaut/vim/index.html#VimBall
(the mysite.verizon.net one will be the more recent version)
2) Remove the old vimball plugin and install the new one:
Linux:
cd /usr/local/share/vim/vim70
/bin/rm plugin/vimball*.vim autoload/vimball*.vim doc/pi_vimball.txt
mv (wherever it was downloaded)/vimball.tar.gz .
gunzip vimball.tar.gz
tar -xvf vimball.tar
Windows:
Under Windows, check your runtimepath to determine where your
vim 7.0's runtime directories are:
vim
:echo &rtp
:q
The first directory is likely your personal plugins directory,
the second one is your vim system directory.
cd (to your vim system directory)
del plugin\vimballPlugin.vim
del autoload\vimball.vim
del doc\pi_vimball.txt
ren (wherever)\vimball.tar.gz vimball.tar.gz
gunzip vimball.tar.gz
tar -xvf vimball.tar
3) Get DrawIt:
http://vim.sourceforge.net/scripts/script.php?script_id=40
http://mysite.verizon.net/astronaut/vim/index.html#DRAWIT
4) Install an up-to-date version of Drawit:
vim DrawIt.vba.gz
:so %
:q
Steps 1&2 are all about updating vimball; in the future, whenever 7.1
comes out, that complication will no longer be necessary.
Regards,
Chip Campbell