Related
I am used to Resharper where I can search for files, not the content, but the filename, which makes it quick to open new files.
Is this feature implemented in Visual Studio Code and is there a shortcut for it?
Using Go to File... which is under the Go menu or using keyboard shortcut:
On Windows Ctrl+p or Ctrl+e
On macOS Cmd ⌘+p
On Linux Ctrl+p or Ctrl+e
Then type the file name.
Also be sure to checkout that you can set your own keybindings and that there are cheatsheets available for Windows, macOS and Linux.
Since the 1.70.0 release in July 2022, you can find and filter in tree views such as the Find Explorer. You can press Ctrl+F inside trees to pop up the Find control.
Before the 1.70.0 release
when you click anywhere in the explorer tree, and start typing something on the keyboard, the search keyword appears in the top right corner of the screen : ("module.ts")
And when you hover over the keyword with the mouse cursor, you can click on "Enable Filter on Type" to filter tree with your search !
On OSX, for me it's cmd ⌘ + p. cmd ⌘ + e just searches within the currently opened file.
Method1
Go->Go to File OR cntrl+p
Search your file
Method2
view->command palette OR cntrl+shift+p
type "Go to file"
Search your file
Win: CTRL+P or CTRL+E
Mac: CMD+P or CMD+E
Don't want to remember another shortcut?
Open the Command Palette:
Menu: View -> Command Palette
Windows Shortcut: Ctrl+Shift+P
and hit backspace to delete ">" character and then begin typing to search for files via filename. :)
Other answers don't mention this command is named workbench.action.quickOpen.
You can use this to search the Keyboard Shortcuts menu located in Preferences.
On MacOS the default keybinding is cmd ⌘ + P.
(Coming from Sublime Text, I always change this to cmd ⌘ + T)
Also works in ubuntu with Ctrl+E
You can also press F1 to open the Command Palette and then remove the > via Backspace. Now you can search for files, too.
consider you have thousand of files in vs code and you want to search for a file with particular name then
Right click VS code editor.
Select Command Palete
In the text box type the file name
The problem with Ctrl+P (or Cmd+P) is that it searches your workspace while ignoring files and folders set in the .gitignore file. To change this behavior, add "search.useIgnoreFiles": false in your settings.json file under .vscode directory.
NOTE that search.exclude and files.exclude settings will override this. So, in your settings.json file, you should comment them out or set these two settings to false as well if you want to search all the files and directories in your VS Code project. An example for settings.json where search.exclude and files.exclude are commented out for searching all the files:
{
"search.exclude": {
//"**/Lib": true,
//"**/Scripts": true
},
"files.exclude": {
//"**/Lib": true,
//"**/Scripts": true
},
"search.useIgnoreFiles": false
}
Look here for more info.
I'm using VSCode 1.12.1
OSX press : Cmd + p
If you just want to search a single file name
Just Ctrl+P, then type and choose your one
If you want to open all files whose name contains a particular string
Open search panel
Put any common words inside those files
in 'files to include', put the search string with *, e.g. *Signaller*
For filtering in the tree on keyboard typing. The feature is deprecated. No more work.
No more of this old red inflexible box:
The replacement is way better and more interesting:
Actually not really. It could have been. The new way only filters on expanded folders only. And that's a shame. Check the last session for where the development is at. And for the options we are left with.
https://code.visualstudio.com/updates/v1_70#_tree-find-control
CMD + F (mac) or CTRL + F (else) [while focused]
No settings are needed. It just works. And more elegantly (except for the problem of only filtering searching through the visible expanded directories).
And for the default mode. highlight or filter. You can change that with:
"workbench.list.defaultFindMode": "highlight"
"workbench.list.defaultFindMode": "filter"
Only the open folders and visible elements Problem and what are we at?
It's great to know about this feature. But then you'll soon encounter the limitation it has at the moment.
Filtering only through open directories. It can help great. But then we want to filter through all. And when the project is big. That becomes totally unusable.
Issues: 1, 2, 3
We can see it's added to the backlog here:
https://github.com/microsoft/vscode/issues/116286
duplicates: 1
You may think:
Expand all
Ok what about expanding all. Then using this.
===> That would work great => But => There is no such a feature of expanding all now.
Issues: 1, 2, duplicates: 1
Some configuration
At the moment no configuration does help!
"workbench.list.keyboardNavigation": "filter"
doesn't and many others. I tried them all. For the moment!
Extension that do that probably using web view
None exists. And to be implemented one needs to figure out the indexation used by vscode. Or implement its own indexation and then fuzzy search through using indexes. Otherwise something more simple that works for no big directories. Can be built fast. [I don't have time to do it myself. Especially that this would be resolved sometime in the future and we still can work with CTRL|CMD + P]
So that to clear for you the thoughts that you may get. And save you time.
Resume
So shortly we may see the feature of filtering all in a future version of vscode as it was added to the backlog. Right now we will be waiting. And maybe long enough.
Expand all seems not to be coming at any time or any time soon.
So what now. Left with nothing? Here a WORKAROUND
The now is => use CTRL|CMD + F on visible things. or on folders. By manually expanding them.
Or use CTRL|CMD + P without closing it. By following the next rules:
To open multiple files in the same editor. Navigate up and down and for each file use Right Arrow.
When they open they will be opened beside each other. You can use CMD|CTRL + ALT + LEFT | RIGHT to navigate between tabs left and right. Faster and better with the keyboard. The last open is the one you'll be at when you close the pallet.
To open a file in a new split editor use ALT + RIGHT ARROW.
Ref: 1
For windows.
if Ctrl+p doesn't always work
use Ctrl+shift+n instead.
To search for specifil file types in visual studio code.
Type ctrl+p and then search for something like *.py.
Simple and easy
If using vscodevim extension, ctrl + p won't work so I saw another answer using:
ctrl + shift + p
which opens the command palette. Hit backspace to remove the '>' and then start typing your filename.
Check your settings for 'Use Ignore Files' and 'Use Global Ignore Files'.
If these are checked, VSCode won't search any folders listed in .gitignore or .ignore
With VSCode 1.75 (Jan 2023), you will have a new file filter option: a 'Fuzzy Match' toggle.
That comes from issue 116286: Tree: Support continuous find
In a list of files I can filter them by start typing the name of the file. It is a super useful feature when you have hundreds+ files.
My issue is that the filter is trying to find the letters in the whole file name.
Here is an example search for word "file":
this-is-**file**-i-looked-for.jpeg (I expect this to be returned)
**f**or-th**i**s-**l**.jp**e**g (This should not be returned, it is only a random match)
Would it be possible to add there extra settings to only returns full strings matches? Or is there some setting already buried somewhere?
Solution: adding a 'Fuzzy Match' toggle button to the tree find widget.
New options:
defaultFindMatchTypeSettingKey.fuzzy: Use fuzzy matching when searching.
defaultFindMatchTypeSettingKey.contiguous': Use contiguous matching when searching.
I ended up installing the extension File Name Search. It displays in the side navigation bar all files that match a name part, so I can open them one by one to check them or process them.
Ctrl + p: we have to repeat the search for each file
Ctrl + f in the
explorer: it does not search, it just filters files in epanded
folders
Here is a demo of a search in explorer followed by a search in the Filename search extension:
I am used to Resharper where I can search for files, not the content, but the filename, which makes it quick to open new files.
Is this feature implemented in Visual Studio Code and is there a shortcut for it?
Using Go to File... which is under the Go menu or using keyboard shortcut:
On Windows Ctrl+p or Ctrl+e
On macOS Cmd ⌘+p
On Linux Ctrl+p or Ctrl+e
Then type the file name.
Also be sure to checkout that you can set your own keybindings and that there are cheatsheets available for Windows, macOS and Linux.
Since the 1.70.0 release in July 2022, you can find and filter in tree views such as the Find Explorer. You can press Ctrl+F inside trees to pop up the Find control.
Before the 1.70.0 release
when you click anywhere in the explorer tree, and start typing something on the keyboard, the search keyword appears in the top right corner of the screen : ("module.ts")
And when you hover over the keyword with the mouse cursor, you can click on "Enable Filter on Type" to filter tree with your search !
On OSX, for me it's cmd ⌘ + p. cmd ⌘ + e just searches within the currently opened file.
Method1
Go->Go to File OR cntrl+p
Search your file
Method2
view->command palette OR cntrl+shift+p
type "Go to file"
Search your file
Win: CTRL+P or CTRL+E
Mac: CMD+P or CMD+E
Don't want to remember another shortcut?
Open the Command Palette:
Menu: View -> Command Palette
Windows Shortcut: Ctrl+Shift+P
and hit backspace to delete ">" character and then begin typing to search for files via filename. :)
Other answers don't mention this command is named workbench.action.quickOpen.
You can use this to search the Keyboard Shortcuts menu located in Preferences.
On MacOS the default keybinding is cmd ⌘ + P.
(Coming from Sublime Text, I always change this to cmd ⌘ + T)
Also works in ubuntu with Ctrl+E
You can also press F1 to open the Command Palette and then remove the > via Backspace. Now you can search for files, too.
consider you have thousand of files in vs code and you want to search for a file with particular name then
Right click VS code editor.
Select Command Palete
In the text box type the file name
The problem with Ctrl+P (or Cmd+P) is that it searches your workspace while ignoring files and folders set in the .gitignore file. To change this behavior, add "search.useIgnoreFiles": false in your settings.json file under .vscode directory.
NOTE that search.exclude and files.exclude settings will override this. So, in your settings.json file, you should comment them out or set these two settings to false as well if you want to search all the files and directories in your VS Code project. An example for settings.json where search.exclude and files.exclude are commented out for searching all the files:
{
"search.exclude": {
//"**/Lib": true,
//"**/Scripts": true
},
"files.exclude": {
//"**/Lib": true,
//"**/Scripts": true
},
"search.useIgnoreFiles": false
}
Look here for more info.
I'm using VSCode 1.12.1
OSX press : Cmd + p
If you just want to search a single file name
Just Ctrl+P, then type and choose your one
If you want to open all files whose name contains a particular string
Open search panel
Put any common words inside those files
in 'files to include', put the search string with *, e.g. *Signaller*
For filtering in the tree on keyboard typing. The feature is deprecated. No more work.
No more of this old red inflexible box:
The replacement is way better and more interesting:
Actually not really. It could have been. The new way only filters on expanded folders only. And that's a shame. Check the last session for where the development is at. And for the options we are left with.
https://code.visualstudio.com/updates/v1_70#_tree-find-control
CMD + F (mac) or CTRL + F (else) [while focused]
No settings are needed. It just works. And more elegantly (except for the problem of only filtering searching through the visible expanded directories).
And for the default mode. highlight or filter. You can change that with:
"workbench.list.defaultFindMode": "highlight"
"workbench.list.defaultFindMode": "filter"
Only the open folders and visible elements Problem and what are we at?
It's great to know about this feature. But then you'll soon encounter the limitation it has at the moment.
Filtering only through open directories. It can help great. But then we want to filter through all. And when the project is big. That becomes totally unusable.
Issues: 1, 2, 3
We can see it's added to the backlog here:
https://github.com/microsoft/vscode/issues/116286
duplicates: 1
You may think:
Expand all
Ok what about expanding all. Then using this.
===> That would work great => But => There is no such a feature of expanding all now.
Issues: 1, 2, duplicates: 1
Some configuration
At the moment no configuration does help!
"workbench.list.keyboardNavigation": "filter"
doesn't and many others. I tried them all. For the moment!
Extension that do that probably using web view
None exists. And to be implemented one needs to figure out the indexation used by vscode. Or implement its own indexation and then fuzzy search through using indexes. Otherwise something more simple that works for no big directories. Can be built fast. [I don't have time to do it myself. Especially that this would be resolved sometime in the future and we still can work with CTRL|CMD + P]
So that to clear for you the thoughts that you may get. And save you time.
Resume
So shortly we may see the feature of filtering all in a future version of vscode as it was added to the backlog. Right now we will be waiting. And maybe long enough.
Expand all seems not to be coming at any time or any time soon.
So what now. Left with nothing? Here a WORKAROUND
The now is => use CTRL|CMD + F on visible things. or on folders. By manually expanding them.
Or use CTRL|CMD + P without closing it. By following the next rules:
To open multiple files in the same editor. Navigate up and down and for each file use Right Arrow.
When they open they will be opened beside each other. You can use CMD|CTRL + ALT + LEFT | RIGHT to navigate between tabs left and right. Faster and better with the keyboard. The last open is the one you'll be at when you close the pallet.
To open a file in a new split editor use ALT + RIGHT ARROW.
Ref: 1
For windows.
if Ctrl+p doesn't always work
use Ctrl+shift+n instead.
To search for specifil file types in visual studio code.
Type ctrl+p and then search for something like *.py.
Simple and easy
If using vscodevim extension, ctrl + p won't work so I saw another answer using:
ctrl + shift + p
which opens the command palette. Hit backspace to remove the '>' and then start typing your filename.
Check your settings for 'Use Ignore Files' and 'Use Global Ignore Files'.
If these are checked, VSCode won't search any folders listed in .gitignore or .ignore
With VSCode 1.75 (Jan 2023), you will have a new file filter option: a 'Fuzzy Match' toggle.
That comes from issue 116286: Tree: Support continuous find
In a list of files I can filter them by start typing the name of the file. It is a super useful feature when you have hundreds+ files.
My issue is that the filter is trying to find the letters in the whole file name.
Here is an example search for word "file":
this-is-**file**-i-looked-for.jpeg (I expect this to be returned)
**f**or-th**i**s-**l**.jp**e**g (This should not be returned, it is only a random match)
Would it be possible to add there extra settings to only returns full strings matches? Or is there some setting already buried somewhere?
Solution: adding a 'Fuzzy Match' toggle button to the tree find widget.
New options:
defaultFindMatchTypeSettingKey.fuzzy: Use fuzzy matching when searching.
defaultFindMatchTypeSettingKey.contiguous': Use contiguous matching when searching.
I ended up installing the extension File Name Search. It displays in the side navigation bar all files that match a name part, so I can open them one by one to check them or process them.
Ctrl + p: we have to repeat the search for each file
Ctrl + f in the
explorer: it does not search, it just filters files in epanded
folders
Here is a demo of a search in explorer followed by a search in the Filename search extension:
I was trying to learn all the eclipse shortcuts... I couldn't find anything useful.
There are some shortcuts available for easy ones, like Find, Find in Files, Comment, Uncomment etc.
Is there any way to view all the eclipse shortcuts?
Clicking Ctrl+Shift+L from eclipse, will list all the shortcuts. This is pretty useful, as you don't need to switch to another window... You can do your work without any interruption.. :-)
Open Windows->Preferences->General->Keys. Now you can use the filter to find your shortcut and change its binding.
CTRL + SHIFT + L
Shows you a list of your currently defined shortcut keys.
However this will only show you custom short cuts that user have added therefore, Please find useful eclipse short-cuts below
CTRL + /
In line Comment
CTRL + SHIFT + /
Block Comment
CTRL + D
Delete row. Try it! You no longer need to grab the mouse and select the line, or select Home, Shift + End, Delete. Quick and clean.
ALT + Up/Down Arrow
Move the row (or the entire selection) up or down. Very useful when rearranging code. You can even select more rows and move them all at once. Notice, that it will be always correctly indented.
ALT + Left/Right Arrow
Move to the last location you edited. Imagine you just created a class "Foo", and now you are working on a class "Boo". Now, if you need to look at the "Foo" class, just press Alt+Left Arrow. Alt+Right Arrow brings you back to "Boo".
CTRL+SHIFT+O
Organize imports. What happens when you first use a class you have not yet imported? You will see an error. But when you press this magical combination, all your missing classes will be imported, and the unused imports will vanish.
CTRL+1
Probably the most useful one. It activates the quick fix. Imagine you create a class, which implements some interface. You will get an error, because the inherited methods are not yet implemented. While you are on line where the error occurs, press this combination to activate the quick fix. Now, select the "Add unimplemented methods" option. You can use the quick fix at every error you ever receive.
Quick fix comes in handy in other situations too. My favorite is the "Split variable declaration". Sometimes I need to broaden the scope of a variable. I activate the quick fix, split declaration, and use alt + arrow to put it where it belongs. You can find even more uses: Convert local variable to field, rename in file, inline local variable, etc...
You could use the "Split variable declaration" on the bar variable, and then move it with Alt+Arrows above the try block..
Or you could use the "Add unimplemented methods" fix here.
The best thing you can do if you see an error is to use the quick fix.
CTRL+SHIFT+T
Open Type. Imagine, that you need to have a look at the "Foo" class. But, where is the "Foo" class? Is it in the "Boo" project and in the "foo.bar" package? Or somewhere else? With this shortcut, you don't need to know. Just press it, type "Foo" and you are in.
CTRL+E
Shows you a list of all open editors.
CTRL+F6
Use to move between open editors. This is a slower alternative to Ctrl + E. It comes in handy in a situation when you want to periodically switch between two editors, something that is nearly impossible with Ctrl+E as it sorts entries quite randomly. Or you might just use Alt+Arrows...
CTRL+F7
Move between views. When in the editor, press Ctrl+F7 to switch to the Package Explorer, or hold Ctrl and press F7 multiple times to switch to other views.
CTRL+F8
Move between perspectives. The same as the previous.
CTRL + F11
Runs the application. What gets launched depends on your settings. It will either launch the last launched class (my preferred way) or it will launch the currently selected resource (the default way). If you want to change its behavior read the previous post.
CTL + N
Open new type wizard. This is not very quick because you have to select the wizard type (whether you want to create new class, jsp, xml or something else) in the next step. A much faster way would be if you could just hit the shortcut and invoke the particular wizard. It is possible, just keep reading...
CTRL + M
Maximize or umaximize current tab.
CTRL + I
Corrects indentation.
CTRL + SHIFT + F
Formats code. You can make beautiful looking code out of a mess with this. It requires a bit of setup, but it is well worth it. You can find its settings under Window->Preferences->Java->Code style->Formatter
CTRL + J
Incremental search. Similar to the search in firefox, it shows you results as you type. Don't be surprised if when you hit this combination nothing happens - at the first glance. Just start typing and eclipse will move your cursor to the first occurence.
CTRL+SHIFT+G
Bind this to "Generate getters and setters". This is a "must have".
ALT+C
Bind this to SVN/CVS "Commit".
ALT+U
Bind this to SVN/CVS "Update".
yes, you can go Window - Preferencee - General - Keys and see all available shortcuts. Also you can reorder keys here.
Also you can read more about eclipse shortcuts here
Does Eclipse have a way to search a whole project for some text like Xcode's "find in project" feature?
1. Ctrl + H
2. Choose File Search for plain text search in workspace/selected projects
For specific expression searches, choose the relevant tab (such as Java Search which allows you to search for specific identifiers)
For whole project search:
3. Scope (in the form section) > Enclosing project (Radio button selection).
Ctrl + Alt + G can be used to find selected text across a workspace in eclipse.
OSX: ⌥ Option + ⌘ Command + G
Press Ctrl + H to bring up the search that includes options to search via project, directory, etc.
Ctrl+H.
Also,
Open any file quickly without browsing for it in the Package
Explorer: Ctrl + Shift + R.
Open a type (e.g.: a class, an interface) without clicking through
interminable list of packages: Ctrl + Shift + T.
Go directly to a member (method, variable) of a huge class file,
especially when a lot of methods are named similarly: Ctrl + O
Go to line number N in the source file: Ctrl + L, enter line number.
Ctrl + H is the best way!
Remember to copy the string before you start searching!
You should check out the new Eclipse 2019-09 4.13 Quick Search feature
The new Quick Search dialog provides a convenient, simple and fast way to run a textual search across your workspace and jump to matches in your code.
The dialog provides a quick overview showing matching lines of text at a glance.
It updates as quickly as you can type and allows for quick navigation using only the keyboard.
A typical workflow starts by pressing the keyboard shortcut Ctrl+Alt+Shift+L
(or Cmd+Alt+Shift+L on Mac).
Typing a few letters updates the search result as you type.
Use Up-Down arrow keys to select a match, then hit Enter to open it in an editor.
CTRL + H is actually the right answer, but the scope in which it was pressed is actually pretty important.
When you have last clicked on file you're working on, you'll get a different search window - Java Search:
Whereas when you select directory on Package Explorer and then press Ctrl + H (or choose Search -> File.. from main menu), you get the desired window - File Search:
yes, but you need to open the global search panel. to do so, press the binoculars icon on the top right corner of the IDE.
you can even filter searches by function identifiers, method scopes an etc...
Choose File Search for plain text search in workspace/selected projects
For specific expression searches, choose the relevant tab (such as Java Search which allows to search for specific identifiers)
First customize your search dialog. Ctrl+H. Click on the Customize button and select inly File Search while deselecting all the others. Close the dialog.
Now you can search by selecting the word and hitting the Ctrl+H and then Enter.
yes, but you need to open the global search panel.
to do so, press the binoculars icon on the top right corner of the IDE.
you can even filter searches by function identifiers, method scopes an etc...
There is no way to do pure text search in whole work workspace/project via a shortcut that I know of (and it is a PITA), but this will find references in the workspace:
Put your cursor on what you want to lookup
Press Ctrl + Shift + g
There is very nice tool "Eclipse Quicksearch" available. Checkout SpringSource Update Site for Eclipse i.e: http://dist.springsource.com/release/TOOLS/update/e4.6/ (you can try other versions replacing last part of URL with i.e. e4.4 or e4.5)
It works well with Neon Release (4.6.0). It gives you nice incremental text search with source file preview. I had no issues with it so far.
Usage:
Alt + s "Quick Search Command" opens "Quick Text Search" dialog. You can select whether search should be case sensitive or not. Really good tool.
Ctrl+H is very handy here. I mostly search in the current project, not the whole workspace. To find all occurences in the whole project of a string that is in your current buffer, just select the string press Ctrl+H and hit enter. Easy as that!
Use Resource Filters!
Eclipse will restrict the search result using the Resource Filters defined for your project (eg. right click on you project name and select Properties -> Resource -> Resource Filters). So if you keep getting search hits from parts of your project that your not interested in you could make Eclipse skip those by adding a Resource Filter for them. This is especially useful if you have build files or logs or other temporary files that are part of your projects directory structure, but you only want to search amongst the source code. You should also be aware of that files/directories matched for exclusion in the Resource Filters will not show up in the Package Explorer either, so you might not always want this.
Search and Replace'
Ctrl + F Open find and replace dialog
Ctrl + F / Ctrl + Shift + K Find previous / find next occurrence of search term (close find window first).
Ctrl + H Search Workspace (Java Search, Task Search, and File Search).
Ctrl + J / Ctrl+Shift +J Incremental search forward / backwards.
Type search term after pressing Ctrl+J, there is now search window
Ctrl+shift+O Open a resource search dialog to find any class
What others have forgotten is Ctrl+Shift+L for easy text search. It searches everywhere and it is fast and efficient. This might be a Sprint tool suit which is an extension of eclipse (and it might be available in newer versions)
I know there is a trick that when you type quickly code in Eclipse, you can hit some secret keys and it will auto-complete the missing parts. Who knows them?
example: I have someVeryLongVariablesWhichIWantToTypeFast and I start typing someVeryLongVa but nothing happens. Only when I type method names a yellow box appears that wants to help me.
Ctrl + Space is the autocomplete shortcut
All shortcuts you can find under Window -> Preferences -> General -> Keys
As mentioned the command is Ctrl+Space to auto complete.
You can speed it up using camelCase...so in your example:
someVeryLongVariablesWhichIWantToTypeFast
you could start typing sVL then Ctrl+Space should auto complete or list all variables that match.
CamelCase also works for specify classes, searching for classes etc.
Others I like/use:
type sysCtrl+Space to get System.out.println statement (or err)
type foreCtrl+Space after an array/list line to foreach it
Click on an argument to a method and Ctrl+1 to create a field for it and assign it, great for constructors
Ctrl+1 on any local variable to convert to field, split declaration, or inline it
if you have
object.method().method2().method3()
selecting object.method() and type Ctrl+1 to assign to a field or local variable, then you get
Object objLocal=object.method()
objLocal.method2().method3()
//Can now select objLocal.method2() and do the same again
My favourites:
Ctrl + Space - auto complete
Ctrl + 1 - show quick fix options when you are over an error / warning
Shift + Ctrl + L - list short cuts
One trick that I love in Eclipse for Java is writing backwards (meaning you write the client before the code it calls). We typically think of autocomplete to help us with methods and variables that already exist. This is okay, but even cooler is when a method/class does not exist.
Try typing this code into a method (anywhere, really):
Who who = new Who();
who.whatUpMan("hi", 32);
Now left-click on the Who at the beginning. It will give you the choice to create a class, interface, enum, etc.
Now left-click on the whatUpMan. It will prompt you to create the method with the right parameter types and everything.
These are called "Quick Fixes" in Eclipse and they give you total freedom to code from the client "backwards" to classes it utilizes. And when you've already got the method, of course, control-space and control-shift-space (to see parameters for methods) are your friends.
http://eclipse-tools.sourceforge.net/EclipseEmacsKeybindings_3_1.pdf
Some more time savers that don't seem to be mentioned:
Ctrl+3 'Quick Access' which basically let's you reach anything without clicking around too much. E.g. type 'nav' in the popup dialog, rather than Window | Show View | General | Navigator or wherever it is.
Ctrl+O 'Quick Outline': when editing Java (and some other things), pops up a lighweight dialog so that you find anything in the file by a few keystrokes
Shift+Alt+T 'Refactoring', and things below that menu - look for shortcuts there, use 'Rename', 'Move', 'Extract method', 'Change method signature' often
Alt+Up/Down move blocks of code up/down without cut/paste
Alt+Shift+Up/Down select various levels of code (expressions,statements, methods, class) easily
Ctrl+1 on the selected code offers you cool stuff eg. Extract to variable/constant/method; Split variable declaration -- see others above, or just try it on anything
Ctrl+Shift+R find any file in the workspace, similar to Ctrl+Shift+T to find types
Ctrl + Shift + O : resolve all dependances automaticall. In Java, it's a life saver as it cleans old packages and add the required one without a single line to write.
"Right click" then "refactor" : all the features are handy, but I espacially love "rename" (Ctrl + Shift + R, c.f comments) because it will apply the changes to all the project. No more tricky find / replace wit regexp to do ensure you breal nothing else :-)
"Right click" then "source" : equally useful, with a special mention to "generate getter and setter" and "implement methods"
Ctrl + D : delete a line. Kinda cool.
I kind of remember CTRL+SPACE was the shortcut for autocomplete.
Another time-saver is formatting the code automatically using Ctrl + Shift + F.
Formatter preferences http://img187.imageshack.us/img187/5866/eclipseformatter.png
General Eclipse tips
Get rid of all the crap that you'll never use
if you do web-dev ... install the database, php, pydev, modules and plugins
install svn/cvs/git plugin
use Trac
have different code enviornments for different code types, i.e. one for python-dev, c++, and so on.
wait a few weeks to months before updating
i have about 100 premade mini scripts that i use frequently.
learn to develop your own plugins, as it's easy and fun.
For some applications, the answer is to generate the code using EMF. But the EMF learning curve is significant.
I would suggest go to Eclipse -> Preferences -> General -> Editor -> Keys and to configure your own keyboard shortcuts for all common tasks so that you can have custom keybindings that are perfect for you.
Probably this might not exactly answer your question but it is very relevant to your question title.
You can define templates in Eclipse to magically type and get a bunch of code typed for you. For instance you may type something like syso or sout to get System.out.println() in your Java code.
This can be done by following Window -> Preferences -> Java -> Editor -> Templates. You can also add a Template View, which you find at Window -> Show View -> Other -> Search for Templates.
Here is an image to clarify
* Original related answer in here as well.
Hope it is helpful to someone :)