vim "+norm Go" "+startinsert" $filename

Use the command

vim "+norm Go" "+startinsert" $filename

to automatically move at the end of the file and start editing.

This is useful when you are invoking vim from another script i.e. when you don’t want this to be the default behaviour but want it in a special case.

For me this was useful for my journal script which appends the current time at the end of a file and opens the file and (now) automatically moves to the end and goes to insert mode.

🎵
"I tell you, those voices soared higher and farther than anybody in a gray place dares to dream. It was like some beautiful bird flapped into our drab little cage and made those walls dissolve away, and for the briefest of moments, every last man in Shawshank felt free."

— Red