gherkin

Gherkin Highlighting for VIM

Monday, June 21st, 2010 | Uncategorized | 4 Comments

I really wanted some highlighting on my .feature files in vim, I’m no vim expert so I did a bit of googling and came up with the following:

  • Download cucumber.vim from http://github.com/tpope/vim-cucumber/blob/master/syntax/cucumber.vim
  • Save the file to ~/.vim/cucumber.vim (creating the directory if required)
  • vim ~/.vimrc and add the following lines

    au Bufread,BufNewFile *.feature set filetype=gherkin
    au! Syntax gherkin source ~/.vim/cucumber.vim
  • Make sure
    syntax on

    is also present

  • Open your feature file

If anyone knows a more vim way of doing this feel free to add a comment.

Tags: , , , , ,