Storing code snippets in eclipse

前端 未结 7 1498
你的背包
你的背包 2020-11-29 17:19

I\'m a recent semi-convert to Eclipse after 20 years of using vi and gvim. One of the things I miss about gvim is that I could cut a bunch of different snippets of code int

相关标签:
7条回答
  • 2020-11-29 17:45

    Eclipse also offers something very similar to the templates feature described by VonC called (would you believe) snippets. Window > Show view > Snippets.

    To add a new snippet category: Right click in the Snippets window and click Customize... Click New > New Category. Enter a category name if necessary (e.g. "Java"). Click Apply. With your chosen category selected, click New > New Item. Enter your snippet.

    To use a snippet, put the cursor where you want to insert the snippet, then double click on a snippet in the Snippets window.

    0 讨论(0)
提交回复
热议问题