简体   繁体   中英

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 (eg)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM