diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-11 15:05:13 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-11 15:05:13 +0200 |
commit | 271b63d71707720ad0d35590b8cb50f8f8f43014 (patch) | |
tree | 1b71daa457afc68465f66ee2afc9a00c1380f23d /ftplugin/cucumber.vim | |
parent | acd7ce59503b22ac7663fc25776efe25e266f1d4 (diff) | |
download | vim-polyglot-1.13.2.tar.gz vim-polyglot-1.13.2.zip |
Updatev1.13.2
Diffstat (limited to 'ftplugin/cucumber.vim')
-rw-r--r-- | ftplugin/cucumber.vim | 5 |
1 files changed, 4 insertions, 1 deletions
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 <SID>foldopen <Bar>if &foldopen =~# 'tag'<Bar>exe 'norm! zv'<Bar>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 |