New Atom Editor Package Offers Code Snippets for WordPress Plugin and Theme Developers

Last week we featured Ahmad Awais’ WordPress package for Sublime Text that adds a snippet-based library for creating customizer options. Yesterday WordPress developer Chris Wilcoxson published a similar package for the free and open source Atom Text editor.

Atom is developed by GitHub to be a “hackable text editor for the 21st Century,” thanks to its extensive package library (4,400+). Packages extend the code editor in useful ways for different programming languages and developer needs.

Wilcoxson’s new WP-Dev package offers code snippets for WordPress plugin and theme developers. The package includes common snippets for creating customizer controls, Settings API and admin functions, debugging, the loop, and registering custom post types and taxonomies. A full list of the snippets is available on both the package and GitHub pages for the project.

The package can be installed by navigating to Atom > Preferences > Install and then searching for wp-dev. Once installed, you can launch the snippets by using the snippet key combo (shift + opt + s). Start typing the shortcut and available snippets will appear.

wp-dev-snippets

“I was inspired to put something together after seeing Ahmad Awais’s Sublime Text package,” Wilcoxson said. “I hadn’t explored Atom’s snippets before this and thought it would be better than having all these snippets in my starter themes and plugins.”

Wilcoxson said the package is currently a collection of snippets that he has been using for projects. He’s diving into post and term meta and plans to include some of those snippets in the future updates.

I tested it and everything works as expected – snippets drop right in like magic after clicking on the shortcut. It’s easy to see how a built-in snippet library can increase productivity for WordPress developers working in Atom. Autocomplete is one feature that is noticeably lacking, but Wilcoxson said this is on the roadmap for the package. He also welcomes suggestions and contributions on the project’s GitHub page.


LIKE THIS

0

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Discover more from WP Tavern

Subscribe now to keep reading and get access to the full archive.

Continue reading