On 5/5/06, Max Dyckhoff <[EMAIL PROTECTED]> wrote:
F4 I want to do a block comment, namely put /* at the beginning of the
selection and */ at the end. Currently I am using a massive hack for
this (xi<HOME>/*<CR><HOME>*/<CR><up><up><esc>p) but was wondering if
there was anyway of doing a search and replace for an entire block,
something like

:s/start_of_visual_selection(.*)end_of_visual_selection/\/*\1\/*/

Try along the lines of
   :map <f4> <esc>`>ia*/<esc>`<i/*<esc>
OR
   :map <f4> <esc>`>iA<cr>*/<esc>`<O/*<esc>
depending on your needs. (all untested). This
came up recently in the list.

Yakov

Reply via email to