On Mon, 23 Apr 2012, smu johnson wrote:

As the subject suggestions, I can't get the search highlight to work from inside a function. If I run it myself using the colon command and typing it in.. then it works.

function ChangeSearchRegister ()
 let @/ = "Change"
 set hlsearch
endfunction

Adding a "redraw" line after the "set hlsearch" line in the function fixes the issue for me.

- Christian

--
             Not to be taken internally, literally or seriously.
Christian J. Robinson <[email protected]>      http://christianrobinson.name/

--
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui