View Single Post
Old 03-15-2012, 11:44 AM
MrC MrC is offline
Registered User
Join Date: Mar 2004
Posts: 216
Here's the idea in its simplest form for *nix platforms:

map ( :'a,.w!~/.vimscratch
map ) :r ~/.vimscratch
Enter it into your .exrc or .vimrc and restart vi/vim (or re-load the init file). Use by going to the first line you want copied, mark with a (keystroke: ma) move to the last line, and then hit ( to push the lines to the scratch file. Go to your new file on the same machine, move to point one line above where you want the lines to be placed, and enter ).

Re: your tabs substitution, type:

:help retab

in vim.
Reply With Quote