0

A simple question. I want to make some vim commands but only for selected lines using shift+v. Manually is possible: I press shift+v and I select the lines I want to modify, then I press : and in the <> interval i put my commands(s, norm, etc). But if I want to call a script? I try this: I press shift+v and I select the lines I want to modify, then i press : and in the <> interval i put this

source scripts/myscript.vim

but return error E481. How to solve?

1 Answer 1

0

Solution found with a workaround. Instead of using shift+v I put the range of lines which I want to modify directly in the script

#!/usr/bin/vim
11,18 s#\\set#exec :#
11,18 norm wwwi:=

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .