Git Product home page Git Product logo

sublime-text-2-wordpress's Introduction

Sublime Text 3 WordPress Package

Sublime Text 3 WordPress Package is a collection of WordPress snippets and autocompletions for Sublime Text 2 or 3

Features

Autocomplete for:

WP version : 4.8.1

Functions          : 2909
Hooks              : 2045
Constants/Classes  :  866

Notes

Deprecated functions (219) have been removed

The first "tab" deletes all parameters instead of having to tab through each one:

  • First Tab-->Select all parameters
  • Each Tab Thereafter-->Selects each individual parameter or block

Snippets

Some updated snippets use the same name as the function, the autocomplete will show an "ALL Options" selection. For example to register a custom post type you would write register_post.... Please review the snippets <tabTrigger> to see how to call the rest.

Special thanks for updated scraping:

Original TextMate author : Gipetto
Original scraper : @ericandrewlewis
Scraper :@wycks
Latest scraper :@jtsternberg

Tip

Sublime won't autocomplete PHP files when there is no closing ?> tags , so in "Preferences-->Settings-User" add this snippet:

"auto_complete_selector": "source, text",

Install instructions

Just install via package control (WordPress) or clone into your sublime-text-3 package directory.

sublime-text-2-wordpress's People

Contributors

builtbylane avatar chriseverson avatar ediamin avatar ericandrewlewis avatar ericwlange avatar garyjones avatar jtsternberg avatar mickeykay avatar mrwweb avatar purplefish32 avatar sir-daniel avatar tareq1988 avatar wycks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sublime-text-2-wordpress's Issues

Argument hints for WordPress functions missing?

Dear purplefish,

I was delighted to see a wordpress bundle for sublime text. For some reason, although it autocompletes the function names (get_po... > get_post), but does not hint what arguments are accepted (http://codex.wordpress.org/Template_Tags/get_posts).

I was hoping I could spare me a couple of visits to the codex by having that information right within sublime text. Any idea what I might be doing wrong (installed the package through the package manager, so I figured that shouldn't a cause of error :o/)

Yours,
Torsten

extra semicolon after functino

hi
when i use predefined function name an extra semicolon added at the end of function that really bad.
i think if it will delete will be better
Thanks

Sublime Text 3 Support

I'm not sure what's involved but it would be great to have support for Sublime Text 3. It seems to be very stable and lots of people are using it (since it came out in 2013...)

Scope of theloop snippet is wrong?

Hi Purplefish,

I noticed a bug while using the snippet for the WordPress loop. The snippet (theloop, tab) has a PHP scope, yet the snippet itself contains tags.

Perhaps you can edit the snippet so it doesn't contain the php tags or change the scope for the snippet?

Thanks :).

How do you activate the auto-completions?

Hey, thanks for porting this to sublime! I'm new to the program however and can't figure out how to activate the auto-completions. any help would be much appreciated!

Post Formatting Shortcode Snippet

Support for shortcodes like [one_half] [one_third] etc?

[full_width][/full_width]
[one_half][/one_half]
[one_half_last][/one_half_last]
[one_third][/one_third]
[one_third_last][/one_third_last]
[two_third][/two_third]
[two_third_last][/two_third_last]
[one_fourth][/one_fourth]
[one_fourth_last][/one_fourth_last]
[three_fourth][/three_fourth]
[three_fourth_last][/three_fourth_last]
[one_fifth][/one_fifth]
[one_fifth_last][/one_fifth_last]
[two_fifth][/two_fifth]
[two_fifth_last][/two_fifth_last]
[three_fifth][/three_fifth]
[three_fifth_last][/three_fifth_last]
[four_fifth][/four_fifth]
[four_fifth_last][/four_fifth_last]
[one_sixth][/one_sixth]
[one_sixth_last][/one_sixth_last]

check syntax

For some reason the snippets don't check rather it's in php or not. Messes up with emmet

[proposal] PHP Haml scope

Hi all,

I was thinking about adding HAML scope to this package; what do you think about? It would activate completion for developers coding in HAML+PHP (we use this package at work https://github.com/xt99/sublimetext-php-haml) and it won't stress at all who code only in HTML+PHP.

In alternative I can for sure mantain a separate fork, but I think overall is better to contribute if is general interest.

What do you reccomend?

Thanks in advance

Localization shortcut?

It's Command + Shift + I on the textmate version, what is it in Sublime Text 2? I don't see it anywhere.

Meta query add ")" after array

Please see this snippet and add the ")" to close issue

//Custom Field Parameters 'meta_key' => 'key', 'meta_value' => 'value', 'meta_value_num' => 10, 'meta_compare' => '=', 'meta_query' => array( array( 'key' => 'color', 'value' => 'blue', 'type' => 'CHAR', 'compare' => '=' ), array( 'key' => 'price', 'value' => array( 1,200 ), 'compare' => 'NOT LIKE' ),
You have three arrays but only two was closed

Thank you

Only few snippets available after installed

Hi,

I installed the package via Package Control but only these snippets seem to be working: theme_head, readme and wp-config. I also checked if all snippet files were copied to the Packages directory and they are all just there. Not sure what is going here. I'm using Mac OS 10.7 with Sublime Text 2 Beta build #2181.

Instructions?

Is there instructions on how to install these in ST2?

Rename Wordpress to WordPress

It may seem trivial, but this package using the lowercase version of WordPress is kinda bugging me. Would it mess things up to rename to the proper version?

<?php is duplicated

The scope for the plugin header snippet is PHP, so I have to add <?php to my file to denote it is PHP, yet the snippet add <?php. Can this be removed if using this method to denote PHP (as opposed to Set Format)?

Maintainer assistance?

Thank you for this package, it is awesome.

Right now, you are the top result and used result for WordPress snippets for sublime, but the package is woefully out of date.

Are you open to maintainer assistance? I would love to take the time to get the hooks/constants/etc up-to-date with the current version of WordPress.

Inaccurate package so I created a new one

I found several inaccuracies in this package so I created a custom parser for WP and a new package, you can view the output here: https://github.com/wycks/SublimeText-WordPress-Autocomplete

Some differences compared to this one ( I work with WP pretty much everyday):

  • The functions completions contains approximately 818 more functions/hooks.

  • The constants are more accurate

  • The plugin is updated when WP is updated (currently 3.6)

  • Deprecated functions have been removed

  • It does not contain any snippets

    I still need to add class completions.

Do you have any suggestions on how we can work these packages together into sublime since they can't really have 2 autocomplete plugins.

Cheers

Theme head snippet not working?

I'm not able to use the Theme Head snippet via either the tab trigger or the console, the other snippets are working fine. Is there a problem with the scope?

Snippets should follow WordPress PHP formatting standards

For example the shortcode snippet outputs the following:

function func_name( $atts ) {
    $atts = extract( shortcode_atts( array( 'default'=>'values' ),$atts ) );

    // do shortcode actions here
}
add_shortcode( 'shortcode-id','func_name' );

Which should really have linebreaks and spaces inserted as follows:

function func_name( $atts ) {
    $atts = extract( shortcode_atts( array( 
        'default' => 'values'
    ), $atts ) );

    // do shortcode actions here
}
add_shortcode( 'shortcode-id', 'func_name' );

Also see ticket #31 on removing the extract() function.

Widget snippet with encoded HTML?

There's a very strange problem in the widget snippet. All of the angle brackets ("greater than") are encoded as HTML entities. So, when we use the snippet, array assignments key => value and objects $this->something appear as key =&gt; value and $this-&gt;something .

I was wondering, was this supposed to be like that?

Thanks

Depricated functions

I am in the process of running through the automated functions scraped from wordpress and changing all $args into their real values in the wordpress codex as per the_post()
I am running into depricated functions (ex : list_authors()).
My question is : do I remove them alltogeather or are some people still using depricated wprdpress functions and want me to leave them in ?

First Tab โ€“> Select all parameters

Hi, I don't know why, but when I press the Tab, it doesn't select all parameters but directly the first parameter.

I use the last version with Sublime Text 3 (3143)

Thanks in advance and sorry for my english :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.