Hej,

> I'm searching for a script to:
> select a text and put a html tag around

I use this to comment out parts of html files.

--------------------------------------
function! Blub() range
        echo "hallo"
        exec "normal `<i<!--\<esc>"             " start of the comment
        if a:firstline == a:lastline
                exec "normal `>4la-->"          " end 
        else
                exec "normal `>a-->"            " end
        endif
endfunction

vmap ,C :call Blub()<CR>
--------------------------------------

Select the part of the text you want to apply this function to, and hit
,C in normal mode.

This should be easily adjusted to insert arbitrary tags.

Cheers,
        Kai.

-- 
All mail clients suck. This one just sucks less.

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to