When creating a file to write code in pycharm, it is nothing but you open the VIM editor. Therefore, before starting to write code in the VIM editor, you need to press "i" (without the double quotation mark) in the editor window (or) paste paste which is on top of the keyboard.
source
to share