Sunday, August 1, 2010

Programatically executing a search and storing regular expression

Here is the snippet from from a function that I wrote:
function! StdNextFunction()
let fileType = &ft
if fileType == 'taglist'
execute '/function'
execute ':nohls'
elseif fileType == 'php'
execute '/function '
execute ':nohls'
....
I bind this to gn
I press
gn
and I find the target string.
Then, I press
n
and I might get an error message that says:
"No previous regular expression"
OR
I might find that a search for a previous regular expression has
been executed.
Question:
What do I need to add the the command strings above that
'stores' the regular expression?

thanks
--
Tim
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com

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

Post a Comment