Daniel L. VanDenBosch
Daniel L. VanDenBosch

Reputation: 2725

Datagrip comment header hotkey

At my company I'd like to create a standard for the creation of database functions with a comment header, something like:

/*
==================================================
Author:     John Doe
Created At: (Automatically fills in current date)
Where used: User fills in URL or whatever
==================================================
*/

Is there a way in data grip to bind this text to a hotkey?

Upvotes: 0

Views: 332

Answers (1)

moscas
moscas

Reputation: 10335

Yes, of course: snippet functionality is called Live Templates.

  1. Open Settings
  2. Go to Live Templates
  3. Create a new template with an abbreviation, say, 'com'.
  4. In editor type 'com' and press Tab.

enter image description here

PS. Play with the variables for the placeholders.

Upvotes: 2

Related Questions