Hi Yakov,

* Yakov Lerner <[EMAIL PROTECTED]> wrote:
> On 10/24/06, Fabian Braennstroem <[EMAIL PROTECTED]> wrote:
>> Hi Yakov,
>>
>> * Yakov Lerner <[EMAIL PROTECTED]> wrote:
>> > On 10/24/06, Fabian Braennstroem <[EMAIL PROTECTED]> wrote:
>> >> Hi Yakov,
>> >>
>> >> * Yakov Lerner <[EMAIL PROTECTED]> wrote:
>> >> > On 10/24/06, Fabian Braennstroem <[EMAIL PROTECTED]> wrote:
>> >> >> Hi,
>> >> >>
>> >> >> I just found the new ':set cul' feature, which underlines
>> >> >> the current line. Now, I would like to use it just for
>> >> >> searching (it seems to slow to use it for general editing),
>> >> >> i.e. when I jump to a search result using n|N I want to see
>> >> >> the 'underline', but as soon as I start editing the line, it
>> >> >> should disappear again.
>> >> >> Does anybody have an idea, how I can achieve this?
>> >> >
>> >> > noremap n :set cul<cr>n
>> >> > noremap N :set cul<cr>n
>> >> > au InsertEnter * set nocul
>> >>
>> >> Works well. Thanks! It would be nice, if you got a small
>> >> enhancement ... I would like to remove the line as soon as I
>> >> move to a line without a 'search result'. Probably, I just have
>> >> to map something on 'j' and 'k'!?
>> >
>> > noremap j :set nocul<cr>j
>> > noremap k :set nocul<cr>k
>>
>> Thanks that works for searching, but then I am not able to
>> mark a some lines in 'Visual Mode' using 'k' and 'j'
>> anymore. I'll check the mapping, so it does not work in
>> 'Visual Mode'...
>
> You're right. Here's a fix. This shall not mess with
> visual mode: (note additional 'n's):
>
> nnoremap j :set nocul<cr>j
> nnoremap k :set nocul<cr>k

Pretty easy ... thanks a lot!

Greetings!
 Fabian

Reply via email to