1) Focus and concentration, without distractions.
2) Think a little bit before writing on what you will write. Thus I have better program with less need to rewrite.
3) Using a 13inch laptop. The small screen estate forces me to concentrate on what I am doing right now. No place for other editor windows or browsers or anything else, just my code and my work.
What does NOT make you faster:
1) Having a special mechanical/ergonomic/whatever keyboard.
2) Having multiple large screens with tons of windows open. This is most of the time distraction and not helpful. Avoid it.