sponsor Vim development Vim logo Vim Book Ad

[backburner]Edit_Visual_Block.vim : Edit text from Visual Block as if a virtual window.

 script karma  Rating 1/1, Downloaded by 587    Comments, bugs, improvements  Vim wiki

created by
Eric Arnold
script type

Edit_Visual_Block.vim :   Edit the text in a Visual Block as
                           if it were in a virtual window.

       Creates a virtual 'edit window' inside the visual selection area.
       Once the boundary box is drawn, you can insert/replace/cut/paste as
       normal, and it will try to maintain the boundary box in some
       reasonable fashion.


       i   Select a Visual Block (with ^V or ^Q), and type 'i' (default
           mapping).  It will draw a box around the visual area, and return
           you to Vim Normal mode.  Begin editing.  See Notes for things
           not to do.

           Hitting escape while in Vim Normal mode will terminate the
           Edit Visual Block mode, and return to the visual block


   -   While this mode is in effect, for the lines that are part of
       the seletion, characters outside of the visual block selection
       cannot be changed,.  It needs these strings as markers for the
       boundaries of the virtual edit window.

       If changes are made, the boundary strings will be restored, with
       other text moved inwards, if possible.
   -   Deleting or adding lines in the selected area is not handled or

   -   Pasting simple block-wise("^V"), or line-wise ("V") text will
       generally do something useful, but pasting multi-line char-wise
       ("v"), will generally do something messy.
   -   Until I can decypher 'undojoin', you will have use more than one
       'undo' at a time, i.e.  '2u' or '3u' or whatever, to undo the last
       change while the mode is in effect.

install details

       -   Put into your plugin directory, or source as desired.

       -   Decide what key to map.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
Edit_Visual_Block.vim 1.0 2006-04-28 7.0 Eric Arnold Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo