Is there a way to configure the autocomplete to show words from all the open editors (or all files in the project)?

I also have a project idea related to this: configuring autocomplete in a project to show suggestions based on file types for example:for .rb files, get suggestions from all the .rb files in the projectfor .erb files, get suggestions from all the .rb, .erb files, etc.