favish / atom-drupal

Drupal snippets, filetypes and hotkeys for the Atom Editor
MIT License
28 stars 14 forks source link

Get automatically hook prefix #12

Closed mikaoelitiana closed 6 years ago

mikaoelitiana commented 8 years ago

Hook prefix can be automatically set from current file name or folder name. So when i run snippet h.menu, it will automatically replace "hook" with the custom module name from filename.

michaelfavia commented 8 years ago

Great idea! If you'd like to submit a PR id be happy to include it. Please be sure it deals with non .module files too like views hooks, etc.

robballou commented 8 years ago

Is this supported now? I've tried in the past... :disappointed:

See:

If it is supported now I can help get this in there.

mikaoelitiana commented 8 years ago

I don't know if it is yet supported but I will check it.

nvaken commented 8 years ago

I'd like to add that PHP Storm's Drupal integration might be a good place to find some inspiration. The Drupal plugin there is truly magnificent. When you start typing your module name, it simply suggests hook function names.

abdennour commented 8 years ago

I will leave ATOM because this lack And i switch to VIM because of this feature.

See you in VIM community.

michaelfavia commented 8 years ago

@abdennour: or you could be the change you wish to see in the world and write it! Best of luck.