In PyCharm, suddenly some menu commands stopped working

0

In Pycharm Edu 2018.3 some menu commands and their keyboard shortcuts some days ago stopped working (menu commands are dimmed and keyboard shortucts do nothing).

E. g. while editing a Python file, the Ctrl+/ for commenting lines does nothing, and related command Code | Comment with line commentis dimmed. But in Python Console are both fully functional!

Ctrl+Shift+F10 for running the code does nothing, too, but the green triangular arrow in the toolbar works.

I restarted Pycharm Edu many times without a success. Yesterday it suddenly worked, but after exiting and restarting Pycharm it stopped worked again.

What happens and how to fix it?


Note: In the same time, on the same computer, and with the same Python file in its editor window the Pycharm Professional 2018.1.5 works perfectly.

MarianD

Posted 2019-01-19T16:00:56.610

Reputation: 2 572

Have you tried reinstalling Pycharm? – DavidPostill – 2019-01-19T18:08:10.167

@DavidPostill, no for now, I'm worried about losing my settings, projects, and installed plugins. – MarianD – 2019-01-19T18:24:55.657

Answers

0

The problem is with missing association of *.py pattern with Python type, so PyCharm don't know that those are Python files, and consequently it don't know how to comment lines of such file, or how to launch it.

How to fix it:

File | Settings | Editor | File Types 

and add *.py pattern into bottom part (click on +) after selecting "Python type" in the upper part.

enter image description here

MarianD

Posted 2019-01-19T16:00:56.610

Reputation: 2 572

0

solution is simple:

Turn off Vim Emulation in the Tools menu

Edit: I had the same problem, and this solved. I suffered for 2 weeks on this thing and that irritated me but finally this solved.

it is working

rahul rachh

Posted 2019-01-19T16:00:56.610

Reputation: 1

To improve the answer, you should explain why this action solves the problem: for example, "I had the same problem, and this solved". – AndrewQ – 2019-04-12T08:16:25.933

sure, thnks!!!! – rahul rachh – 2019-04-12T10:57:54.297