tech notes

February 6, 2008

vim key mappings for php/symfony

Filed under: php — admin @ 2:25 pm

I’ve recently added these key mappings to my .vimrc file:

map <C-t> :!php -l %<CR>

this checks php syntax of the currently edited file after hitting CTRL-t.

map <F9> :!php ./%<CR>

press F9 to run your php script.

map <C-s> :!d=`pwd`; until [ -f symfony ] ; do if [ `pwd` = "/" ] ;\
then exit ; fi ; cd ../; done; symfony cc; cd $d<CR>

this may be useful when working with symfony projects. After making some changes in your symfony project you have to clear cache if you want to preview them in your browser. This maps CTRL-s with “symfony cc” command. You can run it from any subdirectory of your symfony project.

2 Responses to “vim key mappings for php/symfony”

  1. rpsblog.com » A week of symfony #58 (4-&gt;10 february 2008) Says:

    [...] vim key mappings for php/symfony [...]

  2. Symfony.es » Blog Archive » Una semana con Symfony #31 (4-10 febrero 2008) Says:

    [...] vim key mappings for php/symfony [...]

Leave a Reply

You must be logged in to post a comment.

Powered by WordPress