From 8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:44:24 +0200 Subject: Adding upstream version 2:8.1.0875. Signed-off-by: Daniel Baumann --- runtime/ftplugin/cucumber.vim | 150 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 runtime/ftplugin/cucumber.vim (limited to 'runtime/ftplugin/cucumber.vim') diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim new file mode 100644 index 0000000..f4848d1 --- /dev/null +++ b/runtime/ftplugin/cucumber.vim @@ -0,0 +1,150 @@ +" 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