From 271b63d71707720ad0d35590b8cb50f8f8f43014 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 11 May 2015 15:05:13 +0200 Subject: Update --- ftplugin/cucumber.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ftplugin/cucumber.vim') diff --git a/ftplugin/cucumber.vim b/ftplugin/cucumber.vim index b2f60fdd..af734eec 100644 --- a/ftplugin/cucumber.vim +++ b/ftplugin/cucumber.vim @@ -19,6 +19,9 @@ 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 @@ -52,7 +55,7 @@ endfunction function! s:allsteps() let step_pattern = '\C^\s*\K\k*\>\s*(\=\s*\zs\S.\{-\}\ze\s*)\=\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)' let steps = [] - for file in split(glob(b:cucumber_root.'/**/*.rb'),"\n") + for file in split(glob(b:cucumber_steps_glob),"\n") let lines = readfile(file) let num = 0 for line in lines -- cgit v1.2.3