add autocmd mask to mode constructor function