From 5b77877888162f4e415fe9a7b8c5e9fb5dfb6ee1 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 27 Sep 2017 20:43:42 +0200 Subject: Add syntax files from upstream vim repository --- ftplugin/cucumber.vim | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) (limited to 'ftplugin/cucumber.vim') diff --git a/ftplugin/cucumber.vim b/ftplugin/cucumber.vim index 2b9fff04..c0cb8dcf 100644 --- a/ftplugin/cucumber.vim +++ b/ftplugin/cucumber.vim @@ -1,3 +1,157 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vim') == -1 + +" Vim filetype plugin +" Language: Cucumber +" Maintainer: Tim Pope +" Last Change: 2016 Aug 29 + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +let s:keepcpo= &cpo +set cpo&vim + +setlocal formatoptions-=t formatoptions+=croql +setlocal comments=:# commentstring=#\ %s +setlocal omnifunc=CucumberComplete + +let b:undo_ftplugin = "setl fo< com< cms< ofu<" + +let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') +if !exists("b:cucumber_steps_glob") + let b:cucumber_steps_glob = b:cucumber_root.'/**/*.rb' +endif + +if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") + cnoremap foldopen if &foldopen =~# 'tag'exe 'norm! zv'endif + nnoremap