On Oct 11, 5:04 am, Szabolcs <[email protected]> wrote:
> Dear group member,
>
> I am using CursorHold and CursorHoldI with a delay of 800 ms to constantly
> auto-save the LaTeX file that is being edited. (Which in turn causes it to
> be automatically recompiled and shown in a PDF reader. I do this to get
> real-time preview.). Occasionally, when I'm working on a large file that
> takes longer to compile, Vim becomes less a responsive, and misses a few
> keystrokes. I.e. sometimes a few characters I type simply don't show up
> 'csing bron wors'.
>
> Is there anything I can do to ensure Vim won't miss any keystrokes? (It's
> okay if the keystrokes show up with a delay, but I don't want them to go
> AWOL)
You don't mention the system you're using. On Windows, I've noticed
that Vim sometimes misses keystrokes because it launched an external
command to do something. When Windows Vim launches an external
command, it briefly loses input focus, so the cmd window which pops up
gets the keystrokes instead.
I don't know how other systems work.
Anyway, I'd expect that your culprit is not the auto-save, but rather,
the auto-preview. I suspect this because the auto-save is completely
internal to Vim (or should be) whereas the auto-preview will be
launching an external command.
I do not know if there is a solution. Perhaps, you could launch the
external command in the background instead, like this on Windows:
:!start /min {process to start}
or even (for applications which do not need stdin/stdout):
:!start /b {process to start}
instead of:
:!start {process to start}
or even:
:!{process to start}
The system() function also seems to briefly steal focus on Windows.
--
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