Open sudar opened 9 years ago
@sudar I'm using a similar setup with VVV, but my project encapsulates all its plugins under wp-content. Can you clarify the project layout that you have under ~/work
?
This is how my setup looks like
~/dev
├── vip-quickstart
├── vvv
I have a copy of WordPress at ~/wp/
. This is only for generating tags and for doing a look up.
My work directory looks like this.
~/work
├── plugin1
├── plugin2
├── theme1
I have mapped my ~/work/plugin1
and other folders into VVV and vip-quickstart depending on whether I am working on a VIP project or not.
Basically I want all PHP files inside ~/work/
to be of filetype php.wordpress
even though they are not inside WordPress directory.
Well, on second thought I don't think it is of very high priority. I added the following line in my vimrc to get it
autocmd BufRead,BufNewFile ~/work/**/*.php set filetype=php.wordpress
Anyways I am curios to know how is your directory structure looks like so please share it. Thanks.
Let me explain my usecase.
Earlier I just used to place all my plugin code inside wp-content directory. So when I set
g:wordpress_vim_wordpress_path
to the WordPress root, the filetype of all files inside that were automatically set tophp.wordpress
.These days I am mostly using VVV or vip-quickstart and I keep all my plugin code inside a specific directory like
~/work/
and share it inside the vm. So when I open these files in vim the filetype is set tophp
and not tophp.wordpress
. I can manually set the filetype tophp.wordpress
, but it would be nice ifWordPress.vim
can provide an option to do it automatically.