Re: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-22 Fir de Conversatie Christian Brabandt
Hi Barry! On Fr, 22 Mär 2013, Barry Arthur wrote: The final version I added to SearchParty: function! PrintWithHighlighting() range let lnum = a:firstline let lnum_len = len(line('$')) for line in getline(a:firstline, a:lastline) echohl LineNr echon printf(%*s , lnum_len,

Re: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-22 Fir de Conversatie Barry Arthur
Ooops! Good catch. I think this fixes it: diff --git a/plugin/SearchParty.vim b/plugin/SearchParty.vim index 373ffd3..2b194f7 100644 --- a/plugin/SearchParty.vim +++ b/plugin/SearchParty.vim @@ -282,7 +282,7 @@ function! PrintWithHighlighting() range let ms = match(line, @/) let me =

Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-21 Fir de Conversatie Axel Bender
How about implementing a hightlighting of the pattern searched for in :g/.../ expressions? At times the resulting list is quite long and it is difficult to identify the pattern. Highlighting it would be of great benefit (at least for me...). -- -- You received this message from the vim_dev

Re: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-21 Fir de Conversatie Christian Brabandt
Hi Axel! On Do, 21 Mär 2013, Axel Bender wrote: How about implementing a hightlighting of the pattern searched for in :g/.../ expressions? At times the resulting list is quite long and it is difficult to identify the pattern. Highlighting it would be of great benefit (at least for me...).

Re: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-21 Fir de Conversatie Ingo Karkat
On 21-Mar-13 11:02:38 +0100, Christian Brabandt wrote: On Do, 21 Mär 2013, Axel Bender wrote: How about implementing a hightlighting of the pattern searched for in :g/.../ expressions? At times the resulting list is quite long and it is difficult to identify the pattern. Highlighting it

Re: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-21 Fir de Conversatie Jürgen Krämer
Hi, Axel Bender wrote: How about implementing a hightlighting of the pattern searched for in :g/.../ expressions? At times the resulting list is quite long and it is difficult to identify the pattern. Highlighting it would be of great benefit (at least for me...). the last time somebody

Re: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-21 Fir de Conversatie Jürgen Krämer
Hi again, Jürgen Krämer wrote: Axel Bender wrote: How about implementing a hightlighting of the pattern searched for in :g/.../ expressions? At times the resulting list is quite long and it is difficult to identify the pattern. Highlighting it would be of great benefit (at least for

Re: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-21 Fir de Conversatie Barry Arthur
On Thursday, March 21, 2013 5:51:50 PM UTC+8, Axel Bender wrote: How about implementing a hightlighting of the pattern searched for in :g/.../ expressions? At times the resulting list is quite long and it is difficult to identify the pattern. Highlighting it would be of great benefit (at

Re: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-21 Fir de Conversatie Gary Johnson
On 2013-03-21, Jürgen Krämer wrote: Hi again, Jürgen Krämer wrote: In the same thread somebody else replied with suggesting a script that probably can be found on vim.org and might be tested more. Alas, I cannot find the original thread at the moment. Found it:

Re: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-21 Fir de Conversatie Axel Bender
Thanks all! Based on your input my final version (taking into account vim's number setting): command! -nargs=? P :call PrintHighlighted(q-args) function! PrintHighlighted(arg) echo if a:arg == # || number let l:lnum = line(.) echohl LineNr echon . repeat( ,

RE: Suggestion: Highlight the search pattern in :g/.../# or :g/.../p

2013-03-21 Fir de Conversatie Choi, Jin-yong
How about using ':grep' when searching through the entire file? function! Grep(pattern) exe 'grep ' . a:pattern let @/ = substitute(a:pattern, '/\(.*\)/.*$', '\1', '') copen endfunction command! -nargs=+ Grepcall Grep(q-args) | set hls cnoreabbrev grep