Yes. Just copy those lines into your .vimrc and source it (:so %). Next time you create a unit (myUnit.pas or myUnit.pp for example) it will automatically insert the line 'unit myUnit' and {$MODE DELPHI}.

Another quickie:
Code:
let g:primary_file=""

function! CompilePascal(mode)
python << endpython
import vim
mode=vim.eval("a:mode")
primary_file=vim.eval("g:primary_file")
if mode=='DEBUG':
    vim.command("set makeprg=ppcx64\ -dDEBUG\ @fp.cfg\ " + primary_file)
elif mode=='NORMAL':
    vim.command("set makeprg=ppcx64\ -dNORMAL\ @fp.cfg\ " + primary_file)
elif mode=='RELEASE':
    vim.command("set makeprg=ppcx64\ -dRELEASE\ @fp.cfg\ " + primary_file)
vim.command("make")
endpython
endfunc
Also, add these line to the Delphi augroup:
Code:
autocmd BufNewFile,BufRead *.pas,*.pp,*.dpr,*.lpr :compiler fpc
autocmd QuickFixCmdPost [^l]* nested cwindow
autocmd QuickFixCmdPost    l* nested lwindow
This little snippet, which you can bind to a key if you like, build pascal projects using fp.cfg (created by the fp-ide).
Usage:
Code:
:let g:primary_file="program.pas" // Only needed once. Subsequent runs will remember this
:call CompilePascal("DEBUG") // replace with "RELEASE" or "NORMAL" for other build configurations
I think I've made a function that scans the folder for a *.lpr or *.dpr file and automatically set it as the primary file. Can't find it right now. When the build is complete you'll be asked to press a key to return to vim, and when back there you'll see that a "quickfix" window has opened, showing errors and warnings issued by the compiler. If you click them, the cursor will be placed at the error, and if you like me doesn't like to use the mouse, you can either type ':cn' or ':cp', or bind them to a key of your choice to jump to next error (cn) or the previous one (cp)