James Vega schrieb:
> On Wed, Oct 14, 2009 at 12:25 PM, mobi phil <[email protected]> wrote:
>> I am often going fast through large files, and would like to have
>> displayed information when moving around.
>>
>> We have autocmd CursorMoved for that. It works nice, when moving with
>> hjkl, but if I switch gear  (ctrl-d, ctrl-u),
>> it stops working, that is the event is not triggered
> 
> Actually, the event is being triggered.  You can verify this with the
> following autocmd:
> 
>   au CursorMoved * :echom strftime('%T')

Works here too.

> Check ":messages" before and after using <C-d>/<C-u>.  The problem seems
> to be that the screen is being redrawn so you lose the displayed
> information.  The same problem happens (at least with this trivial
> example) when you use j or k to scroll the screen.

Usually, in that case, a :redraw just before :echo will help.

> Depending on your use-case, putting the information into the statusline
> might work better.

-- 
Andy


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui