Re: per-window search highlighting/colors
Brian Lewis wrote: I'm editing a file and open a preview window. When I search with /, I'd like the main window to show highlighted matches, but for the preview window not to. nohlsearch seems to be global, so I can't :setl nohlsearch in the preview window to get what I want. Maybe there's a way to modify color scheme settings in the preview window to make highlighted matches look as if they aren't highlighted? Thanks for the help. / or ? search is always global (I mean, it searches within the current file only, but matches are highlighted in all windows); no luck there. Similarly, colorschemes, highlight groups, and the 'hlsearch' option are also global. If you want to un-highlight the search matches once you're done looking at them, you can use the :noh[lsearch] command (without :set); if you want to highlight the matches of different patterns to be highlighted in different colors, you can use the :match and :2match commands. These are all I can think of. see :help :nohlsearch :help :match :help :2match Best regards, Tony.
Re: per-window search highlighting/colors
On Tue, 26 Sep 2006 10:16:22 -0400 Benji Fisher [EMAIL PROTECTED] wrote: On Tue, Sep 26, 2006 at 12:27:39AM -0500, Brian Lewis wrote: I'm editing a file and open a preview window. When I search with /, I'd like the main window to show highlighted matches, but for the preview window not to. I cannot think of a way to do this. Syntax-based highlighting is local to the buffer, so it can be changed for the preview window, but the Search highlight group is not syntax-based. http://www.vim.org/scripts/script.php?script_id=321 is almost what I need. With it, :Bs pattern highlights pattern in just the current window. Can I redefine / to use Bs?
Re: per-window search highlighting/colors
On Tue, Sep 26, 2006 at 12:27:39AM -0500, Brian Lewis wrote: I'm editing a file and open a preview window. When I search with /, I'd like the main window to show highlighted matches, but for the preview window not to. nohlsearch seems to be global, so I can't :setl nohlsearch in the preview window to get what I want. Maybe there's a way to modify color scheme settings in the preview window to make highlighted matches look as if they aren't highlighted? Thanks for the help. I cannot think of a way to do this. Syntax-based highlighting is local to the buffer, so it can be changed for the preview window, but the Search highlight group is not syntax-based. --Benji Fisher
Re: per-window search highlighting/colors
On 9/26/06, Brian Lewis [EMAIL PROTECTED] wrote: On Tue, 26 Sep 2006 10:16:22 -0400 Benji Fisher [EMAIL PROTECTED] wrote: On Tue, Sep 26, 2006 at 12:27:39AM -0500, Brian Lewis wrote: I'm editing a file and open a preview window. When I search with /, I'd like the main window to show highlighted matches, but for the preview window not to. I cannot think of a way to do this. Syntax-based highlighting is local to the buffer, so it can be changed for the preview window, but the Search highlight group is not syntax-based. http://www.vim.org/scripts/script.php?script_id=321 is almost what I need. With it, :Bs pattern highlights pattern in just the current window. Can I redefine / to use Bs? :nmap / :Bsspace Yakov
per-window search highlighting/colors
I'm editing a file and open a preview window. When I search with /, I'd like the main window to show highlighted matches, but for the preview window not to. nohlsearch seems to be global, so I can't :setl nohlsearch in the preview window to get what I want. Maybe there's a way to modify color scheme settings in the preview window to make highlighted matches look as if they aren't highlighted? Thanks for the help.