Gill Bates
Gill Bates

Reputation: 15107

How to paste predefined code snippet in PyCharm?

Is there way to define snippets in PyCharm, built-in or via plug-in? For example I want paste self. by hotkey. Now I'm doing it by 'se' + CTRL+ENTER, but want to find more efficient way for this frequent operation.

Upvotes: 8

Views: 3212

Answers (2)

yole
yole

Reputation: 97133

You can use macros for this purpose. Edit | Macros | Start Macro Recording begins the recording, then Settings | Keymap allows you to assign keyboard shortcuts to macros.

Upvotes: 6

Gareth Latty
Gareth Latty

Reputation: 88977

What you are probably looking for is PyCharm's live templates - although for something as short as self. - they probably are no quicker than typing.

Upvotes: 9

Related Questions