As a first resource on files, buffers, tabs, etc., I recommend this QA and the many links to be found there.
As for autocommands, they are indeed an advanced topic, so having a good grasp of the fundamentals is crucial. In particular, when you start editing a file in a new tab (such as via
BufNewFile should fire (Learn Vimscript the Hard Way has a great resource on autocommands, but I do recommend getting used to
So you can use something like
au BufRead,BufNewFile myPat normal! GAmy text
You can also use the
append(), though from mobile I don’t have the syntax offhand (something like
call append(line('$'), 'my text')).
Lastly, if your specific filename is actually detected as a filetype, and you want to trigger for all filetypes, I would recommend reading about filetype-plugins. Start with the help, and then there are some great resources here (search ftplugin).