Last Updated: February 25, 2016
·
1.231K
· fs

Recognizing cucumber in vim

Cucumber feature files (.feature) are not recognized by default in vim, so you can add make this happen by adding the following commands in your .vimrc

filetype plugin on

augroup filetypedetect
au! BufReadPre,BufReadPost,BufRead,BufNewFile *.feature setfiletype cucumber
augroup END

" For example load external scripts
autocmd FileType cucumber source ~/.vim/ftplugin/cucumber.vim

1 Response
Add your response

You could just use the plugin https://github.com/tpope/vim-cucumber via pathogen (https://github.com/tpope/vim-pathogen). ;-)

over 1 year ago ·