views:

233

answers:

1

I would like to accomplish two tasks at once.

First, to move my snippets of code from .txt files and be able to tag them/organize better.

Second, assign shortcuts to those snippets that will allow me to type "p" + TAB which will render assigned snippet (I don't care of cursor position etc)

+2  A: 

Quick Importing - resources

You can do a brief CTRL + SHIFT + R. This will enable you to display any kind of file from inside your projects directory.

  • To open any resource type * . *
  • To select resource to open type ?
  • To open all text files type *.txt

Snippets - templates

Eclipse has auto fill property. You can enhance it using templates. There are many ready-to-use templates, and you can even create your own.

Templates are used by typing the first character and pressing CTRL + SPACE.

Organize code - formating & tags

If you want to organize you code even more, you can use existing tags like TODO or create your own tags. Use them to sort or prioritize the code snippets you want to import into another project.

You can use CTRL + SHIFT + F to reformat your code.

Secko
ColdBox is what I am looking for but it has to be generic for all languages.
Franek
I dont know of a plugin generic to all languages. You can try WTP - http://www.eclipse.org/webtools/. It should come with built in snippets which you can access from Window Menu>Show View> Others>General>Snippets. It works for web development.
Secko