If you want to ignore things that your editor adds you should add it in .git/info/excludes, not .gitignore.
Also, if you're developing on a Mac, it would also be useful to add .DS_Store. It's an invisible file, and it just stores some properties of that directory,
.cake
pom.xml
*.jar
*.war
lib
classes
buildUse .git/info/exclude or a repository independent personal .gitignore for this.
The projects file is for files created by running the code or maybe some unavoidable build artifacts happening in all cases (.o files for example)
I really hate commits with messages like "updating .gitignore for Joe's new IDE"