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

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 let

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 CTRL-VCTRL-M.

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

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

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 . \CR and execute normal / . l:pattern . \CR I was looking for a way

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

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 highlighted depends on

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 then

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:

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? Have

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 the doc?

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 Max Dyckhoff
-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 Thompson wrote: Why go to the trouble of highlighting it? Have you discovered

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 one.