The basic idea at Vim Tips Wiki works nicely, but it needs some polishing.
First, does anyone actually want
inoremap <buffer> <silent> <Home> <C-o>g<Home> inoremap <buffer> <silent> <End> <C-o>g<End>
I suppose if you were treating the file as one big matrix of characters, perhaps. I personally find it inconvenient. Another problem is an annoying glitch that happens when pressing <End> followed by <Up> on a blank line, and the cursor jumps to the last screen column. A hacky remap fixes it.
inoremap <buffer> <silent> <End> <End><Right><Left>
And even though Vim Tips Wiki calls it “poor practice” (I really can’t imagine why), I like blank lines to have the correct indentation:
:inoremap <CR> x<BS><CR>
(from the same page).
What I’d really like to know is if there is a way to make Vim insert the indent characters there in the first place without simulating actual typing. Oh well.