Could you elaborate a bit? I've never experienced a bug related to keyboard input while using Vim, at least that I know of.
Could you elaborate a bit? I've never experienced a bug related to keyboard input while using Vim, at least that I know of.
From the blog post:
That if statement’s conditions span 17 lines and 4 different #ifdefs. All to call gettimeofday(). Amusingly, even the body of that statement has a bug: times returned by gettimeofday() are not guaranteed to increase. User intervention or ntpd can cause the system clock to go back in time. The correct solution is to use a monotonically increasing time function, such Linux’s clock_gettime() or OS X’s mach_absolute_time().
If ntpd finds that the clock is ahead, it will slow the ticks, allowing it to gradually drift back to the correct time.
The system time should NEVER move backwards. Ever. Relying on the system time not moving backwards is not unreasonable for trivialities like how long you wait for a keystroke. If you reset your system time, you might have to hit a key to get vim to wake up. Shucks.
> ntpd guarantees (under the default settings now [...]) that the clock will never go backwards.
Can you elaborate on what changed? I just downloaded the latest reference implementation, and the man page still seems to indicate that the default behavior is to step when error > 128ms for a prolonged period.
At the expense of supporting FEWER platforms.
A wrapper function could hide the extra #ifdef, taking it out of OP's count. A macro defined during compilation would be even better|harder to understand.
Note: CTRL-S does not work on all terminals and might block further input, use CTRL-Q to get going again.
http://vim.wikia.com/wiki/Map_Ctrl-S_to_save_current_or_new_...
(Caveat emptor, can't speak from first hand experience.)
We had a discussion a few days ago about the ways in which some interfaces (command line in particular) can be user-hostile. (https://news.ycombinator.com/item?id=9831429) Vim's Ctrl-S appears to be a function, keyboard-adjacent to several commonly-used functions, whose main effect for many users is "cause the program to fail immediately with no indication of how to fix it." I don't think I could make up a better example of user-hostile design if I tried.
I have only experienced a handful of vim crashes but all of them were caused by plugins.
Microsoft Word doesn't even accept patches, which I do indeed hold against it.
This is a bug, if you ask me. Or is that impossible for vim to fix?
For example, if you use tmux, add the following to .tmux.conf:
set -s escape-time 0
Other terminal multiplexors and emulators have different commands for this.Edit: There are a few other possible issues you are having: http://www.johnhawthorn.com/2012/09/vi-escape-delays/