Switch between term mode and line mode with C-c C-j