On Thu, Jul 13, 2006 at 06:02:40PM +0200, [EMAIL PROTECTED] wrote: > Hello, > > I have a mapping which immediately searches for visually selected items. > It achieves this by yanking the selected text and exec[utes] a search for > the register content > This works so far. > > vmap / y:execute "/".escape(@",'[]/\.*')<CR> > > Now I tried this first time for multiline selects, but it does not work: > Selecting this: > > USE ICCS_2005 > GO > > leads to: > -> E486: Pattern not found: USE [EMAIL PROTECTED]@ > > To surround the error, I shortened the abbreviation to > vmap / y:execute "/".@"<CR>, > this causes the same error message. > > What is ^@ ? > How can I have \n instead of thes ^@ - characters to make the search work? > > Thank You > > Joachim
:execute "/" . substitute(@", "\<C-J>", '\\n', 'g') or :execute "/" . substitute(@", "\n", '\\n', 'g') :help NL-used-for-Nul HTH --Benji Fisher
