sladda
sladda

Reputation: 442

add custom shortcut to eclipse

I do a lot of javascript stuff with eclipse, so "console.log()" is my friend.

is there a way to tell eclipse to insert "console.log()" on a shortcut like cmd + shift + c (e.g.)

Upvotes: 2

Views: 431

Answers (1)

sndyuk
sndyuk

Reputation: 2780

This is not a custom shortcut. How about this:

  1. Preference -> JavaScript -> Editor -> Templates -> New

    Name: log
    Pattern: console.log()

  2. Click [OK]

  3. Open js file

  4. Type l

  5. Use Short cut command for Content Assist(Dialog appears)

  6. Select log

  7. It will insert console.log() on editor

Upvotes: 4

Related Questions