exコマンドを呼び出すコマンドを定義する :command! WriteCommand :w test.txt :WriteCommand ":command! AlignCommand :normal gg=G :AlignCommand ファンクションを呼び出すコマンドを定義する :function! SimpleFunction() :echo "SimpleFunction() is called." :endfunction :command! SimpleCommand :call SimpleFunction() :SimpleCommand "# => SimpleFunction() is called. パラメータ数チェックつきのコマンドを定義する :function! SimpleFunction() :echo "SimpleFunction() is called