mrmargolis/dogmatic.vim — pull request #4 by jdevera (2011-12-09 13:21:37+00:00)
Title: Use fine grained timeouts when +reltime is available

If Vim is compiled with +reltime support, use the reltime() function to
calculate time intervals. Fall back to localtime() if +reltime is not
available.

The reltime function provides times in nanoseconds, but this changeset
adjusts them to milliseconds to make them consistent with other timeout
values used in some Vim's settings, e.g. timeoutlen. The variable
g:dogmatic_timeout is now expected to have a value in milliseconds.

The timeout logic is also changed so that every arrow key pressed will
update s:last_arrow_press_time, but only those outside the timeout
interval will trigger showing Dogmatic's report. This is done so that if
an arrow key is pressed and kept pressed, the counter only increases
once, and not again until an arrow key is pressed g:dogmatic_timeout
seconds after the last arrow key press. This avoids the counters to be
increased every g:dogmatic_timeout milliseconds when the key is left
pressed.

Reflect these changes in the README file.

Ref: issue #2