Mike Zamansky has posted his latest Using Emacs video. This time the subject is Elpy and YASnippet. In his last video, Zamansky said he doesn’t use Elpy because it’s overkill for his purposes and also because he thought it was fiddly to set up. It turns out that it’s easy to install and configure using use-package
. If you want a single package that does it all for a python environment, Elpy is definitely worth a look. If your Python use is more casual, you may be happier with the setup that Zamansky uses.
The other topic of the video is YASnippet. I use YASnippet and love it. Like Zamansky, I tend not to use it for things like for loops or class definitions but rather for large pieces of boiler plate. For example, the headers for my Org mode blog post sources are entered with YASnippet. That way I don’t have to enter the same 5 lines for each post but at the same time I can tab through the headers filling in the parameters specific to that post.
It’s easy to write your own snippets if the ones that come with YASnippets don’t do what you need. You should check before writing a new one, though, because the package comes with a bunch of snippets for many different languages and environments.
Take a look at Zamansky’s video to get an idea of how they work. As with Elpy, they’re easy to install with use-package
as the video demonstrates. I know a couple of Emacs users who don’t like YASnippet but almost everyone swears by it. You should at least give it a try and see if it helps with your workflow.