(let ((ex (ExMap defaultMap)))
    (ex define:"!"              syntax:"rex|"   as:"ex_bang:")
    (ex define:"#"              syntax:"rc"     as:"ex_goto:")
    ;(ex define:"&"             syntax:"em"     as:"ex_subagain:")
    ;(ex define:'("*" "@")      syntax:"R"      as:"ex_at:")
    ;(ex define:"<"             syntax:"rc"     as:"ex_shift_left:")
    ;(ex define:">"             syntax:"rc"     as:"ex_shift_right:")
    ((ex define:'("buffer" "b") syntax:"E1"     as:"ex_buffer:")        setCompletion:(ViBufferCompletion new))
    ((ex define:"sbuffer"       syntax:"E1"     as:"ex_buffer:")        setCompletion:(ViBufferCompletion new))
    ((ex define:"vbuffer"       syntax:"E1"     as:"ex_buffer:")        setCompletion:(ViBufferCompletion new))
    ((ex define:"tbuffer"       syntax:"E1"     as:"ex_buffer:")        setCompletion:(ViBufferCompletion new))
    ((ex define:"bdelete"       syntax:"!e1"    as:"ex_bdelete:")       setCompletion:(ViBufferCompletion new))
    (ex define:'("cd" "chdir")  syntax:"!e1x"   as:"ex_cd:")
    (ex define:"close"          syntax:"!"      as:"ex_close:")
    (ex define:'("copy" "t")    syntax:"rL"     as:"ex_copy:")
    (ex define:'("delete" "d")  syntax:"rRc"    as:"ex_delete:")
    (ex define:'("edit" "e")    syntax:"!+e1x"  as:"ex_edit:")
    (ex define:"eval"           syntax:"r"      as:"ex_eval:")
    (ex define:"export"         syntax:"E"      as:"ex_export:")
    ;(ex define:'("global" "g") syntax:"r%!/e|" as:"ex_global:")
    ;(ex define:"join"          syntax:"r!c"    as:"ex_join:")
    ;(ex define:'("mark" "k")   syntax:"re1"    as:"ex_mark:")
    ;(ex define:"map"           syntax:"!e"     as:"ex_map:")
    (ex define:'("move" "m")    syntax:"rL"     as:"ex_move:")
    ;(ex define:"put"           syntax:"rR"     as:"ex_put:")
    (ex define:"pwd"            syntax:""       as:"ex_pwd:")
    (ex define:"quit"           syntax:"!"      as:"ex_quit:")
    ;(ex define:"read"          syntax:"rfe1x"  as:"ex_read:")
    (ex define:'("s" "substitute") syntax:"r~c" as:"ex_substitute:")
    (ex define:"set"            syntax:"e"      as:"ex_set:")
    ((ex define:"setfiletype"   syntax:"E1"     as:"ex_setfiletype:")   setCompletion:(ViSyntaxCompletion new))
    (ex define:"split"          syntax:"e1x"    as:"ex_split:")
    (ex define:"new"            syntax:"e1x"    as:"ex_new:")
    (ex define:'("tabedit" "tabnew") syntax:"+ex" as:"ex_tabedit:")
    ;(ex define:"unmap"         syntax:"!e"     as:"ex_unmap:")
    ;(ex define:'("v" "vglobal") syntax:"r%/e|" as:"ex_vglobal:")
    ;(ex define:"version"        syntax:""      as:"ex_version:")
    (ex define:"vsplit"         syntax:"e1x"    as:"ex_vsplit:")
    (ex define:"vnew"           syntax:"e1x"    as:"ex_vnew:")
    (ex define:'("write" "w")   syntax:"r%!f>e1x" as:"ex_write:")
    (ex define:"wq"             syntax:"r%!e1x" as:"ex_wq:")
    (ex define:'("xit" "exit")  syntax:"r%!e1x" as:"ex_xit:")
    (ex define:"yank"           syntax:"rRc"    as:"ex_yank:")

    ; We can define these in straight Nu.
    (set console nil)
    (ex define:"console"        syntax:""
      as:(do (command)
        (if (== console nil)
          (load "console")
          (set console ((NuConsoleWindowController alloc) init)))

        (console toggleConsole:nil)))

    (ex define:"reloadbundle" syntax:"e1x"
      as:(do (command)
        (let (path
               (if ((command arg) length)
                 (command arg)
                 (else
                      ((current-window) displayBaseURL))))
          ((ViBundleStore defaultStore) loadBundleFromDirectory:path))))
)
