But there two problems:
1. how to cut not only the selected recangle but also the lines
containing it? (so the whole block is deleted from the file but only its
rectangle shape is put in clipboard)? (I normally use x or del).
2. How can I paste the block at selected indentation level but in newly
created lines? (so the recangle is pasted but the surrounding text is
not moved/overlapped) (I normally use p or P).
Behaviour of p and x in visual mode is very nice for many purposes but
in this specific case (reorganizing block of codes) can sometimes be
annoying. Is there any other set of commands / mode I should use?
andrzej
>1. how to cut not only the selected recangle but also the lines
>containing it? (so the whole block is deleted from the file but only its
>rectangle shape is put in clipboard)? (I normally use x or del).
Are you in visual mode(v) or visual block mode(Ctrl+v)?
>2. How can I paste the block at selected indentation level but in newly
>created lines? (so the recangle is pasted but the surrounding text is
>not moved/overlapped) (I normally use p or P).
You could try re-indenting your code using =.
-MoonJihad