How to automatically switch to English when I switch to particular application?
Go to Settings -> Keyboard and select the rightmost tab (Sorry only got German Os X at the moment, so I do not know the exact english words which will be displayed).

At the bottom there is a checkbox (the label is something with automatic change input source for documents ...) -> check it. Now you have to select the language for every document at first. But every time you switch back OS X will change the keyboard layout.