Development

HowtoVim

You must first sign up to be able to contribute.

Version 3 (modified by orymate, 8 years ago)
broken syn highlight of

Howto Setup Vim with Symfony - Project Symvimny

install

download: http://pookey.co.uk/files/symvimny.tar

untar to your home directory.

copy ~/symvimny/vimrc.sample to your ~/.vimrc or use the sameple configs contents to modify your existing .vimrc

details

This is tried and tested with Vim7. Vim7 includes far better PHP auto indenting (http://www.2072productions.com/?to=phpindent.txt)

Any questions, email pookey at pookey co uk or message me on IRC.

there are curently code templates for validate/something.yml and config/schema.xml. If you have any other suggestions, please let me know.

typing '=symv' (short for symfony validator) will automatically insert...

class myUnnamedValidator extends sfValidator
{
  public function execute (&$value, &$error)
  {
    if ($value)
    {
      $error = $this->getParameter('my_error');
      return false;
    }
    return true;
  }

  public function initialize ($context, $parameters = null)
  {
    parent::initialize($context, $parameters);
    $this->getParameterHolder()->add($parameters);
    $this->getParameterHolder()->set('my_error', 'Invalid');
    return true;
  }
}

yaml syntax

As of vim 7.2 syntax highlighting of empty strings is broken. A workaround in .vimrc is:

:autocmd Syntax yaml syn match   yamlConstant        '\'\''