Re: search visual block

2006-10-18 Thread Jean-Rene David
* David Fishburn [2006.10.18 22:00]: > " Courtesy of Michael Naumann, Jürgen Krämer > " Visually select text, then search for it > if version >= 602 > " Here are two enhanced versions of these mappings which use VIM 6.2's > " getregtype() function to determine whether the unnamed register >

RE: search visual block

2006-10-18 Thread David Fishburn
> -Original Message- > From: Lev Lvovsky [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 17, 2006 5:04 PM > To: vim@vim.org > Subject: search visual block > > Is it possible to search for a string by selecting that > string in visual mode? Meaning, if I highlight something, > and

Re: search visual block

2006-10-18 Thread David Thompson
--- Robert Cussons <[EMAIL PROTECTED]> wrote: > Jean-Rene David wrote: > > * Robert Cussons [2006.10.18 09:29]: > > > >>Everything seems to work fine now, except the > >>searched for items aren't highlighted like they > >>normally are when I search > > > > > > Whether or not search items are hig

Re: search visual block

2006-10-18 Thread Robert Cussons
Jean-Rene David wrote: * Robert Cussons [2006.10.18 09:29]: Everything seems to work fine now, except the searched for items aren't highlighted like they normally are when I search Whether or not search items are highlighted depends on the value of the 'hlsearch' option. The search item get

Re: search visual block

2006-10-18 Thread Jean-Rene David
* Robert Cussons [2006.10.18 09:29]: > Everything seems to work fine now, except the > searched for items aren't highlighted like they > normally are when I search Whether or not search items are highlighted depends on the value of the 'hlsearch' option. The search item gets highlighted on my end

Re: search visual block

2006-10-18 Thread Jean-Rene David
* Benji Fisher [2006.10.18 09:15]: > I try to avoid such problems by not including raw CR, ESC, etc. > characters in my vim scripts. I suggest replacing the two :execute > lines with > execute "normal ?" . l:pattern . "\" > and > execute "normal /" . l:pattern . "\" I was looking f

Re: search visual block

2006-10-18 Thread Robert Cussons
Jean-Rene David wrote: * Robert Cussons [2006.10.18 06:30]: I did notice that between the if and else there are " which just act as comments as they are on newlines, Sorry, I should have known that wouldn't come out right. There's a literal newline between the quotes. You can enter it by pre

Re: search visual block

2006-10-18 Thread A.J.Mechelynck
Jean-Rene David wrote: * Robert Cussons [2006.10.18 06:30]: I did notice that between the if and else there are " which just act as comments as they are on newlines, Sorry, I should have known that wouldn't come out right. There's a literal newline between the quotes. You can enter it by press

Re: search visual block

2006-10-18 Thread Robert Cussons
Benji Fisher wrote: On Wed, Oct 18, 2006 at 12:28:28PM +0200, Robert Cussons wrote: Jean-Rene David wrote: [snip] "--< cut here >--- " Search for visually selected text {{{ " From an idea by Michael Naumann, Jürgen Krämer. function! VisualSearch(direction

Re: search visual block

2006-10-18 Thread Jean-Rene David
* Robert Cussons [2006.10.18 06:30]: > I did notice that between the if and else there > are " which just act as comments as they are on > newlines, Sorry, I should have known that wouldn't come out right. There's a literal newline between the quotes. You can enter it by pressing . Here's that se

Re: search visual block

2006-10-18 Thread Benji Fisher
On Wed, Oct 18, 2006 at 12:28:28PM +0200, Robert Cussons wrote: > Jean-Rene David wrote: [snip] > > > >"--< cut here >--- > >" Search for visually selected text {{{ > >" From an idea by Michael Naumann, Jürgen Krämer. > >function! VisualSearch(direction) range >

Re: search visual block

2006-10-18 Thread Robert Cussons
Jean-Rene David wrote: * Lev Lvovsky [2006.10.17 17:15]: Is it possible to search for a string by selecting that string in visual mode? Meaning, if I highlight something, and then want to search for that thing which is highlighted in the rest of the doc? You already got lots of good answer

Re: search visual block

2006-10-17 Thread Jean-Rene David
* Lev Lvovsky [2006.10.17 17:15]: > Is it possible to search for a string by > selecting that string in visual mode? Meaning, > if I highlight something, and then want to > search for that thing which is highlighted in > the rest of the doc? You already got lots of good answers. Here's another o

RE: search visual block

2006-10-17 Thread Max Dyckhoff
will get searched for! Hope that helps! Max > -Original Message- > From: Lev Lvovsky [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 17, 2006 4:47 PM > To: David Thompson > Cc: vim@vim.org > Subject: Re: search visual block > > > On Oct 17, 2006, at 4:36 PM, David T

Re: search visual block

2006-10-17 Thread Lev Lvovsky
On Oct 17, 2006, at 4:36 PM, David Thompson wrote: Why go to the trouble of highlighting it? Have you discovered the * key? Just press the * key while in normal mode and vim searches for the word under the cursor. I have indeed, very useful, however this is for multiple words separated by

Re: search visual block

2006-10-17 Thread David Thompson
--- David Thompson <[EMAIL PROTECTED]> wrote: > --- Lev Lvovsky <[EMAIL PROTECTED]> wrote: > > Is it possible to search for a string by selecting that string in > > visual mode? Meaning, if I highlight something, and then want to > > search for that thing which is highlighted in the rest of th

Re: search visual block

2006-10-17 Thread David Thompson
--- Lev Lvovsky <[EMAIL PROTECTED]> wrote: > Is it possible to search for a string by selecting that string in > visual mode? Meaning, if I highlight something, and then want to > search for that thing which is highlighted in the rest of the doc? Why go to the trouble of highlighting it? Hav

Re: search visual block

2006-10-17 Thread Bill McCarthy
On Tue 17-Oct-06 4:03pm -0600, Lev Lvovsky wrote: > Is it possible to search for a string by selecting that string in > visual mode? Meaning, if I highlight something, and then want to > search for that thing which is highlighted in the rest of the doc? You can do this with a visual map: vn