Weiguang Shi wrote:

> I was wondering if there is a plan to add the feature of Normal-mode
> editing  within a visual block. This would be very useful when drawing 
> ASCII figures in Vim, when you want to focus on and make changes in 
> a region. I haven't seen so far scripts smart enough to support, e.g., 
> the Normal command 'ddp' to swap two lines _within_ a visual block, 
> and think the bigger goal, Normal-mode editing within visual blocks, 
> may be better supported natively by Vim. That is, to make editing
> recursive with regard to visual blocks (or anything that marks a
> region).
> 
> Please point me to the obious if I missed it.

You can sort-of do this:
        1. delete the block of text
        2. ":new" to open a temp window
        3. paste the block of text
        4. edit the text in whatever way you like
        5. Select the text as a block and delete it
        6. ":close!" to close the temp window.
        7. paste the edited text back where it was

Adding a new mode for editing while in Visual mode will become more
complicated than this.  Esp. because at point 4. you can use Visual mode
again for changing the text.

Obviously there are some complications if the block is getting bigger or
smaller.  The same complications would occur when editing in Visual mode
directly (as your example "ddp" already does).

-- 
>From "know your smileys":
 :-O>-o   Smiley American tourist (note big mouth and camera)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to