You can already do so. You can use autocommands.
Read this minimal code to get an idea:
https://github.com/MarcWeber/vim-addon-views
I'm using it to view git diff, ...
The important lines are:
augroup VIM_PLUGIN_VIEWS
autocmd BufReadCmd vim_view_*://* call views#FillContents()
augroup end
Well known plugins like netrw also use this.
Marc Weber