Re: Programatically executing a search and storing regular expression
* John Beckett johnb.beck...@gmail.com [100801 20:32]: Tim Johnson wrote: What do I need to add the the command strings above that 'stores' the regular expression? An example is here (you set the @/ register): http://vim.wikia.com/wiki/Search_for_visually_selected_text Thanks John `:h setreg' -- 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
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
RE: Programatically executing a search and storing regular expression
Tim Johnson wrote: What do I need to add the the command strings above that 'stores' the regular expression? An example is here (you set the @/ register): http://vim.wikia.com/wiki/Search_for_visually_selected_text John -- 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