diff --git a/README.md b/README.md index ecb3512..9d34e83 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,9 @@ Plugin 'ocaml/vim-ocaml' NeoBundleInstall ocaml/vim-ocaml' " or use NeoBundleLazy -NeoBundleLazy 'rgrinberg/vim-ocaml', {'autoload' : {'filetypes' : - \ ['ocaml', 'ocamlinterface', 'ocamllex', 'dune', 'opam', 'oasis', 'omake', 'ocamlbuild_tags', 'sexplib']}} +NeoBundleLazy 'ocaml/vim-ocaml', {'autoload' : {'filetypes' : [ + \ 'ocaml', 'ocamlinterface', 'ocamllex', 'menhir', 'dune', 'opam', + \ 'oasis', 'omake', 'ocamlbuild_tags', 'sexplib']}} ``` ## History diff --git a/ftdetect/menhir.vim b/ftdetect/menhir.vim new file mode 100644 index 0000000..72d1135 --- /dev/null +++ b/ftdetect/menhir.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile *.mly set ft=menhir diff --git a/ftdetect/ocaml.vim b/ftdetect/ocaml.vim index 57da7a1..c8b878b 100644 --- a/ftdetect/ocaml.vim +++ b/ftdetect/ocaml.vim @@ -1 +1 @@ -au BufRead,BufNewFile *.ml,*.mly,.ocamlinit,*.mlt,*.mlp,*.ml.cppo set ft=ocaml +au BufRead,BufNewFile *.ml,.ocamlinit,*.mlt,*.mlp,*.ml.cppo set ft=ocaml diff --git a/ftplugin/menhir.vim b/ftplugin/menhir.vim new file mode 100644 index 0000000..543d36c --- /dev/null +++ b/ftplugin/menhir.vim @@ -0,0 +1,11 @@ +" Language: Menhir +" Maintainer: vim-ocaml maintainers +" URL: http://www.github.com/ocaml/vim-ocaml + +if exists("b:did_ftplugin") + finish +endif + +runtime! ftplugin/ocaml.vim ftplugin/ocaml_*.vim ftplugin/ocaml/*.vim + +" vim:sw=2 fdm=indent diff --git a/syntax/menhir.vim b/syntax/menhir.vim new file mode 100644 index 0000000..23cda50 --- /dev/null +++ b/syntax/menhir.vim @@ -0,0 +1,17 @@ +" Vim syntax file +" Language: OCaml Interface +" Filenames: *.mly +" Maintainers: vim-ocaml maintainers +" URL: http://www.github.com/ocaml/vim-ocaml + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +runtime! syntax/ocaml.vim +unlet b:current_syntax + +let b:current_syntax = "menhir" + +" vim: ts=8