Friday, November 10, 2006

My vim setup for editing php files

In a recent chat on #phpc we started discussing vim and talking about vim setups. Surripui posted a blog entry about this asking for setups. I promissed that i would post my setup so here it is.

My .vimrc contains general settings and shortcuts that i use to edit almost any kind of files.

My .vim/ftplugin/php.vim triggers when i edit php files and allows me to syntax check php files with makeprg and use the internal quickfix functionallity in vim. I also use some tabcompletion magic to be able to tabcomplete php functions. And there is some other snacks in here as well.

In adition to this i use gsnippets to get some code templates that i like to use. I have configured gsnippets leader to be .. so i write "..FUNC " to expand my function template.

If you think you know a way i can improve my vim setup for php editing please comment here or grab hold of meus on #phpc.

3 comments:

Toby said...

Nice, that you like my FT plugin! And even more nice, that you refer to it as yours! ;)

Regards,
Toby

Bjarte said...

Hehe :P That came out wrong in the blogpost when i read it now. But i do credit you in the file so i hope it is ok :)

Toby said...

Sure, it's just that open source developers are mostly quite keen on credits.