change method to judge windows
add autocmd to open QF