Shortcut to javascript function stub in Sublime Text 2

Is it possible to quickly create a method stub in Sublime Text 2? Perhaps a package that I could install?

For example, I am linking something in jquery -

$("p").bind("click", {foo: "bar"}, handler) 

Can I right-click on the handler and then select the option to exclude the function?

No need to be a right click, a keyboard shortcut will be even better.

I added textmate to the tags since Sublime is compatible with text mat plugins.

+4
source share
2 answers

You just need to type f and then press tab
Bonus: typing fun and then clicking tab will give you a named function

+7
source

This will be very easy to do with the plugin. Sublime Text has a very extensible API and uses python for its plugins. You will get a much better answer if you post it on a sublime text forum: sublimetext.com/forum/

Many people are ready to help you there and will probably make a plugin for you in a matter of minutes.

0
source

Source: https://habr.com/ru/post/1393135/


All Articles