Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to restrict the speed of input in vim itself (not os)?

To sort of simulate editing session over slow network connection.

share|improve this question

migrated from stackoverflow.com Nov 2 '12 at 0:51

This question came from our site for professional and enthusiast programmers.

    
Maybe bind every key in insert mode to switch to edit mode, then back to insert mode and insert the character :) –  Michael Nov 1 '12 at 23:32

1 Answer 1

up vote 5 down vote accepted

You could do something like this:

:autocmd CursorMoved,CursorMovedI * :sleep 200m

Which causes Vim to pause for 200 milliseconds every time the cursor moves in normal or insert mode. This won't work for the :-command line or in a few other contexts.

See:

:help :autocomd
:help CursorMoved
:help :sleep
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.