On 7/9/06, Matthias-Christian Ott <[EMAIL PROTECTED]> wrote:
Yakov Lerner wrote:
> There is just not enough information in your question.
>
> Please provide small but complete
> example with all details, including:
> - which maps and functions are used & defined
> - what user typed
> - what was in the file
Ok, here's the plugin:

if exists ('format_declaration_plugin')
        finish
endif

let format_declaration_plugin = '1'

vnoremap <silent> <C-W> :call FormatDeclarationSelection ()<CR>

function FormatDeclarationSelection ()
        execute ":silent! normal gvs"
        let lines = split (@", '\n')

This is wrong.
You want "\n", not '\n'.

Yakov


        for line in lines
                echo line
        endfor
endfunction

Insert 3 lines:
test1
test2
test3

Select the lines via v, press <C-W>, the output should be like this:
test1
test2
test3
test1
test2
test3
test1
test2
test3

--
Matthias-Christian Ott

Reply via email to