Thursday, June 21, 2012

highlighting search results from within a function

I've got a function:

function! XXXX()
execute '/this'
endfunction

and when I run it:

:call XXXX()

my cursor is positioned at the first 'this' but the text
is not highlighted (nor is the text of any of the other 'this'
highlighted).

If I go into search history, the search is there and if I
execute the historical search, the 'this's all highlight.

So, my question is: how can I do a search from within a
function and have the search results highlighted?

Thanks

Richard
--
Quis custodiet ipsos custodes

--
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

No comments: