Skip to content

Instantly share code, notes, and snippets.

@j-manu
Created February 23, 2011 08:25
Show Gist options
  • Save j-manu/840172 to your computer and use it in GitHub Desktop.
Save j-manu/840172 to your computer and use it in GitHub Desktop.
Vim tips
If Vim detects that a file has been changed outside Vim and not inside Vim, 'autoread' will make Vim reread it automatically. But that auto-read won't happen if you do nothing. Vim checks timestamps after invoking the shell, and when you issue the ":checktime" command. Even if you add
:au CursorHold,CursorHoldI * checktime
the check will be triggered *once* if you wait for 'updatetime' milliseconds without doing anything, then it won't be retriggered until you hit a key.
You could also use
:map <F7> :checktime<CR>
:map! <F7> <C-O>:checktime<CR>
then hit F7 periodically to see if anything has been added. Etc...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment