From c5fc6a7856fb5146e8fc9b9c9ac912cf67092c8f Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 1 Sep 2020 12:58:44 +0200 Subject: [PATCH] Automate Octave source file recognition This replaces the clumsy instruction we used to tell people in README --- README.md | 14 ++------------ ftdetect/octave.vim | 1 + 2 files changed, 3 insertions(+), 12 deletions(-) create mode 100644 ftdetect/octave.vim diff --git a/README.md b/README.md index db9e135..7addead 100644 --- a/README.md +++ b/README.md @@ -59,15 +59,5 @@ Note that this plugin contributes to ## Usage -Add the following lines to your `vimrc` - -```vim -" Octave syntax -augroup filetypedetect - autocmd! - autocmd BufRead,BufNewFile *.m,*.oct setlocal filetype=octave -augroup END -``` - -Omni completion should works out-of-box by setting -`omnifunc=syntaxcomplete#Complete`. +The plugin should work out of the box. You can enable omni completion +by setting `omnifunc=syntaxcomplete#Complete`. diff --git a/ftdetect/octave.vim b/ftdetect/octave.vim new file mode 100644 index 0000000..eaf40f0 --- /dev/null +++ b/ftdetect/octave.vim @@ -0,0 +1 @@ +au! BufRead,BufNewFile *.m,*.oct setlocal filetype=octave