WordPress .dict file for automatic word completion in vim

I was create .dict file of wordpress functions for automatic word completion in vim.

wordpress .dict file for automatic word completion in vim — Gist

This file created by command below.

find . -name "*.php" -exec egrep '^function ' {} \;\
| sed -e "s/function \(.*\)(.*/\1/g"\
| sed -e "s/^&//g"\
| sort |uniq

class names and class methods are not imported, but it will very handy for vim user.

How to Setup

  1. Download .dict file from gist.
  2. Copy file into directory your choice.
  3. Add row to .vimrc like below.
autocmd FileType php :set dictionary=~/path/to/wordpress.dict

Please enjoy!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s