Re: Keeping hlsearch on after function call

2011-03-26 Thread Christian Brabandt
Hi meino.cramer! On Fr, 25 Mär 2011, meino.cra...@gmx.de wrote: > I used > > :/pattern > > instead of > > /pattern/ > > and I also add "the let-magick" to my script and... Remember, that using :/ for searching will only jump to the line, containing the match. regards, Christian --

Re: Keeping hlsearch on after function call

2011-03-25 Thread Tim Chase
On 03/25/2011 03:17 PM, meino.cra...@gmx.de wrote: I used :/pattern instead of /pattern/ In a function, they should be the same. E.g: function! Tim() /pattern/ endfunction and function! Meino() :/pattern/ endfunction! should be exactly the same. and I also add "the

Re: Keeping hlsearch on after function call

2011-03-25 Thread meino . cramer
Tim Chase [11-03-25 21:04]: > On 03/25/2011 02:20 PM, meino.cra...@gmx.de wrote: > >After the funtino has returned control back to the user > >the matched keywords should be highlighted as if > >the user her-/himself did the search... > > My second function worked for me to do what you describe:

Re: Keeping hlsearch on after function call

2011-03-25 Thread Tim Chase
On 03/25/2011 02:20 PM, meino.cra...@gmx.de wrote: After the funtino has returned control back to the user the matched keywords should be highlighted as if the user her-/himself did the search... My second function worked for me to do what you describe: If you want to have the pattern from yo

Re: Keeping hlsearch on after function call

2011-03-25 Thread Ben Fritz
On Mar 25, 1:31 pm, meino.cra...@gmx.de wrote: > Hi, > > sorry for the diffuse subject ... I simply dont know how to > name the "problem" I have in the length of a subject line: > I a function I a search (":/") at the last step. > : > But regardless how intense I define 'set hlsearch' -- > when t

Re: Keeping hlsearch on after function call

2011-03-25 Thread meino . cramer
Hi Tim, sorry for the confusing input I sent... Before I call the function, there is nothing searched but hls is set via .vimrc (I am on Linux). The function does sort a few lines of text, and the last thing, which the function performs is a search of certain keywords. After the funtino has re

Re: Keeping hlsearch on after function call

2011-03-25 Thread Tim Chase
On 03/25/2011 01:31 PM, meino.cra...@gmx.de wrote: I a function I a search (":/") at the last step. : But regardless how intense I define 'set hlsearch' -- when the function returns, the matches marked via hlsearch are gone. I'm not sure whether you do or don't want the highlighting, and if so

Keeping hlsearch on after function call

2011-03-25 Thread meino . cramer
Hi, sorry for the diffuse subject ... I simply dont know how to name the "problem" I have in the length of a subject line: I a function I a search (":/") at the last step. : But regardless how intense I define 'set hlsearch' -- when the function returns, the matches marked via hlsearch are gone.