Thursday, October 20, 2011

Re: Tracing Vim into a log file.

On 20/10/11 23:49, Eddine wrote:
> Hello
> Yet another question, I have a strange behavior in my Vim at work.
> I often edit logs from process still working and still writing the log
> I'm reading in VIm (I have set autoread so it reloads)
> and I often have a behavior where my file is like folded ;
> All the part from the line 1 to current position of cursor disapears
> and let this charcter g`
> let says I Have
> line1
> line2
> line3
> line4
> line5
> line6 X <--- position of the cursor
> line7
> line8
> line9
> line10
> etc...
> I then have
> g`line6 X
> line7
> line8
> line9
> line10
> etc...
> Entering command :0
> bring me back my whole file.
> I really don't know what happens.
> Is there a way I can trace Vim into a log to know what happens?
> Thank you for your attention.
> Eddine.

I don't know what happened, just that :0 is supposed to bring you to
"line zero" (but since there is no such line, you get to the first line
instead).

Maybe there was a missing refresh?

Try opening your logfile in readonly mode (e.g. with :view rather than
:edit, :sview rather than :new, gview rather than gvim, view rather than
vim, etc.) and if you still have the problem, try Ctrl-L to redraw the
screen.

BTW, trying to write a single file from two processes at the same time
(such as Vim and the log-writing process) is courting disaster. If you
do, you're bound to get problems sooner rather than later.


Best regards,
Tony.
--
Alexander Graham Bell is alive and well in New York, and still waiting
for a dial tone.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: