All Projects → veloce → Vim Behat

veloce / Vim Behat

Behat plugin for vim (adaptation of vim-cucumber)

Labels

Projects that are alternatives of or similar to Vim Behat

Funcoo.vim
Functional Object Oriented VimL
Stars: ✭ 18 (-25%)
Mutual labels:  viml
Cheatsheets
personal cheatsheets on various technologies
Stars: ✭ 23 (-4.17%)
Mutual labels:  viml
Unite Redpen.vim
A unite.vim integration of redpen for automatic proof reading
Stars: ✭ 24 (+0%)
Mutual labels:  viml
Vim Session
Extended session management for Vim (:mksession on steroids)
Stars: ✭ 907 (+3679.17%)
Mutual labels:  viml
Scala Vim Support
Unofficial mirror of Scala Vim support - With a few fixes added.
Stars: ✭ 22 (-8.33%)
Mutual labels:  viml
Rvm.vim
This functionality has been rolled into tpope's vim-rvm
Stars: ✭ 23 (-4.17%)
Mutual labels:  viml
Gist.vim
Create gists from Vim
Stars: ✭ 18 (-25%)
Mutual labels:  viml
Vim Portal
Hello and, again, this is the Portal Gun for Vim.
Stars: ✭ 24 (+0%)
Mutual labels:  viml
Insertlessly
Waste no more time entering insert mode just to insert enters!
Stars: ✭ 22 (-8.33%)
Mutual labels:  viml
Init.vim
My settings for neovim
Stars: ✭ 24 (+0%)
Mutual labels:  viml
Vim lib
Stars: ✭ 22 (-8.33%)
Mutual labels:  viml
Stupid Easymotion
A dumbed down version of EasyMotion that aids navigation on the current line
Stars: ✭ 22 (-8.33%)
Mutual labels:  viml
Vim Htmlbars Inline Syntax
Highlight hbs tagged template literals
Stars: ✭ 24 (+0%)
Mutual labels:  viml
Markmywords
Arbitrary bookmarks for your files and Vim docs
Stars: ✭ 19 (-20.83%)
Mutual labels:  viml
Vim Macroeditor
Edit Vim macros with ease!
Stars: ✭ 24 (+0%)
Mutual labels:  viml
Dotfiles
My dot files
Stars: ✭ 18 (-25%)
Mutual labels:  viml
Ag.vim
Use ag, the_silver_searcher (better than ack, which is better than grep)
Stars: ✭ 23 (-4.17%)
Mutual labels:  viml
Dotfiles
Config's and scripts
Stars: ✭ 24 (+0%)
Mutual labels:  viml
Unite Grep Vcs
An unite source package for git grep and hg grep
Stars: ✭ 24 (+0%)
Mutual labels:  viml
Vim Expand Region
Vim plugin that allows you to visually select increasingly larger regions of text using the same key combination.
Stars: ✭ 924 (+3750%)
Mutual labels:  viml

behat.vim

This is an adaptation of cucumber.vim for Behat.

Behat uses the same language as cucumber to describe features, so indent and syntax scripts are the same as cucumber runtime files. Only the compiler and ftplugin are specific to Behat.

Features

  • autocompletion of steps (with <C-X><C-O>)
  • jump to step definition (behat version from 2.2 and ctags are required) with tag commands <C-]>, <C-W>], <C-W>}
  • compiler plugin that allows you to run behat with :make and see errors in the quickfix window (enable with :compiler behat)
  • works well with neocomplcache (see below the settings needed)
  • Copy to the clipboard the behat command to run features in the current buffer (:BehatCmdToClipBoard). You need to enable behat compiler to have this command.

Installation

You can download the archive, and uncompress it in your ~/.vim folder. I recommand using pathogen.vim, though:

cd ~/.vim/bundle
git clone git://github.com/veloce/vim-behat.git

Behat feature files share the same .feature extension with cucumber, so in order to choose the behat filetype plugin, you need to set the following global in your .vimrc:

let g:feature_filetype='behat'

If you don't, cucumber will be used as filetype by default.

Commands

  • :BehatCmdToClipBoard: copy the behat command for current buffer into the clipboard
  • :BehatInvalidatesOmniCache: clear omni completion cache

Configuration

Global settings examples

" ~/.vimrc

" mandatory if you want the '*.feature' files to be set with behat filetype
let g:feature_filetype='behat'

" The plugin tries successively several behat executables to find the good one
" (php behat.phar, bin/behat, etc). You can define a custom list that will
" be prepended to the default path with g:behat_executables.
let g:behat_executables = ['behat.sh']

" if you use neocomplcache add this to enable behat completion
if !exists('g:neocomplcache_omni_patterns')
    let g:neocomplcache_omni_patterns = {}
endif
let g:neocomplcache_omni_patterns.behat = '\(When\|Then\|Given\|And\)\s.*$'

" disable omni completion steps cache
" normally you don't want to do this because it's slow (and will prevent neocomplcache from working)
" let g:behat_disable_omnicompl_cache = 1

Buffer (local) settings examples

" ~/.vim/ftplugin/behat.vim

" b:behat_cmd_args let you add arguments to the behat command.
" This is useful if you use profiles, or/and a different config file.
let b:behat_cmd_args = '-c path/to/behat.yml'

" This variable is bound to the current buffer, so it let you add custom logic
" to define it.
" For instance, you can set a profile according to features location:
if match(expand('%:h'), 'features\/foo') != -1
    let b:behat_cmd_args = '-p foo'
elseif match(expand('%:h'), 'features\/bar') != -1
    let b:behat_cmd_args = '-p bar'
endif

" add this to automatically set the behat compiler (slows down buffer loading)
compiler behat
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].