Here is vim script to start an M2 session in screen, written by David Cook:

It checks for gnome-terminal; I modified it to run on Apples, with Here is that code: m2.vim.plugin. Save this file as $HOME/.vim/plugin/m2.vim, without the .plugin at the end. (vim did not recognize the file with the .plugin at the end; perhaps some option may be set to take care of this issue.)

Now paste the following into the Apple Script Editor (mine is the one that came with Snow Leopard), and save it as $HOME/local/Applications/VimM2.scpt ('File > Save As > Script').

-- begin applescript

on run argv
        set folderName to item 1 of argv
        set scrName to item 2 of argv

        tell application "Terminal"
                set cmdToRun to "cd " & quoted form of (folderName as string) & "&& screen -d -RR -S " & quoted form of (scrName as string) & " M2"
                tell application "System Events"
                        keystroke "n" using {command down}
                end tell
                do script cmdToRun in first window of application "Terminal"
        end tell
end run
-- end applescript

I have syntax and dictionary files too. I dumped the Dictionary after staring M2, and sorted the keywords etc. in some random fashion. Here they are:

To use these features, use the following rc file: m2.vimrc. Save it as $HOME/.vim/m2.vimrc, and source it from $HOME/.vimrc, preferably with
au BufRead, BufNewFile *.m2 so ~/.vim/m2.vimrc

Created with (need I say!) vim.
Last modified: Sun Mar 7 16:04:24 EST 2010