Use BufEnter instead of BufRead, etc.