googler wrote:
> I'm trying to write a vim script (plugin) that will do the following.
> When I visually select a part of the text and press the key
> F2, it will highlight this text.

The following is NOT what you asked for, but it is similar:
http://vim.wikia.com/wiki/Highlight_multiple_words

The tip matches all occurrences of a pattern, whereas you want
to match the text between two positions.

> But in this case, my line and column numbers are stored in
> variables. So how do I use these in the match command? Is
> there a way?

See ":help :execute" and you might find some clues in some  of
the tips, but I don't think any highlight between two positions.

> A related question is, is it possible to create marks not by
> going to a certain position and doing a ma (for example), but
> just by specifying the line and column numbers?

It's useful to try ":help function-list" and search for likely
terms. It looks like setpos() might help.

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to