Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wordpress.vim #49

Open
salcode opened this issue May 16, 2014 · 8 comments
Open

wordpress.vim #49

salcode opened this issue May 16, 2014 · 8 comments

Comments

@salcode
Copy link
Contributor

salcode commented May 16, 2014

I'm not sure wordpress.vim is working correctly for me.

Now that I have ctags installed when I open wp-config.php before generating any tags I get the message, WordPress: Generating ctags ... and it seems to hang.

I'm also not having any success with
:CtrlPaction nor :Waction

Are these working for others?

If not, my thought is to remove wordpress.vim and see how much functionality we get from ctags directly, with the option to add wordpress.vim back at a later point.

@curtismchale
Copy link
Owner

I'll have to dig in and test to see. Have you tried running without wordpress.vim to see what functionality you still have?

@salcode
Copy link
Contributor Author

salcode commented May 16, 2014

Historically, I haven't really been using much extended functionality. I just got ctags running and prior to that my completion options did not extend beyond the file I was currently editing.

Syntax Highlighting works with the plugin (highlighting is_taxonomy() as given as an example)

:Wdef apply_filters hangs and does not take me anywhere

Wscaffold comes back E492: Not an editor command: Wscaffold

Typing taxonomy in insert mode is supposed to expand to code to add a Custom Taxonomy but it does not for me.

Are these things working for others?

@curtismchale
Copy link
Owner

My experience is the same currently and I haven't been digging in to the extra functions of the wordpress.vim plugin either.

I would hate to give up the syntax highlighting though.

Another feature of this vim config that I don't use huge portions of is NERDCommenter. It's awesome but I still have to learn all the stuff (and remember it) that it can do. I think that wordpress.vim also falls in to that. So much power and stuff I have to remember to learn.

@salcode
Copy link
Contributor Author

salcode commented May 20, 2014

As an alternative for highlighting, we could check out https://github.com/kloppster/Wordpress-Vim-Syntax.

I see the parallel to NERDCommenter in terms of untapped power however, I've been unable to get most of these wordpress.vim features working. I'm of two minds, we could either remove the plugin or change the focus of this issue to "get wordpress.vim working".

@curtismchale
Copy link
Owner

I bet that based on how I run WordPress.vim it's not even running.

See discussion on their issue.
dsawardekar/wordpress.vim#13

@dsawardekar
Copy link

Chiming on this thread, as it was linked by @curtismchale on the wordpress.vim issue #13.

There are a lot of issues here that I was unaware of. Please file bugs on the WordPress.vim tracker. I can only help resolve issues related to the plugin that I'm aware of! 😄

@salcode About hanging on Generating CTags. The plugin builds CTags the first time it runs. This usually corresponds to how long it would take to run ctags in the WordPress directory on your machine. Roughly 3-4 seconds for me. This should only happen once however. Please file a bug if you notice it happening every time.

Also :Wctags! can rebuild the tags. Please do this once if you upgraded from a version that did not have the Jump to Core navigation feature. This is needed because the old tags file generated does not have the meta when I added this feature.

Also to clarify, All Code Navigation features like Jump to Core, :Waction, etc rely on Exhuberant CTags. Without Ctags, you are going to see a very small subset of features. I've tried to document this, but please let me know if something is incorrect or missing.

While you can run Ctags directly without the plugin, do note that I've added custom Regexes to scan for WordPress Actions and Filters. Default Ctags support for PHP doesn't have this built in.

About :Wscaffold. Thats a wp-cli command. If you see a message like that, WP-CLI is missing. I've added better error messaging in 0.1.15 which warns you if WP-CLI is not found.

I'm not sure why the taxonomy snippet isn't triggering for you. Do you have UltiSnips installed? Do any other PHP snippets work?

I'd be happy to follow up on each of these if you file corresponding issues on WordPress.vim.

@salcode
Copy link
Contributor Author

salcode commented May 30, 2014

@dsawardekar you're right, I should be submitting these to the WordPress.vim project. I apologize.

@salcode
Copy link
Contributor Author

salcode commented May 30, 2014

Adding the line
let g:wordpress_vim_tags_file_name = '.git/tags'
to the .vimrc prompts wordpress.vim to look for or write the tags file there.

This would allow the use of Tim Pope's effortless ctags, as discussed in #5 and use wordpress.vim. In this case, the git hook would generate the tags file before Vim (and therefore wordpress.vim) executes, so wordpress.vim would never generate the tags file. The disadvantage is the custom tags generation provided by wordpress.vim that includes hooks would NOT be included in the tags file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants