O'Reilly logo

Mastering PyCharm by Quazi Nafiul Islam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. File Templates and Snippets

 

"Are we there yet?"

 
 --Everyone, including you

Coding is a ton of fun, but sometimes, it can be rather repetitive. Snippets (live templates) in PyCharm help you do away with a lot of the receptive parts. However, PyCharm goes further; it even allows you to make file templates so that once you make a new file, for example, a .py file or a .js file, you can have some boilerplate code written for you. You're already using file templates in PyCharm if you haven't changed its default settings. This chapter is all about coding speed, so hold on to your hats!

In this chapter, we are going to take a look at:

  • File templates
  • Snippets (live templates)
  • Surround templates

File templates

Let's make a new file in PyCharm. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required