PyCharm adds a semicolon after pressing Enter (new file type)

Hello,

I'm doing a new project with Kivy and using the .kv extension, so I defined a new "File type" and syntax highlighting for it.

 

But when pressing enter and the end of a line, Pycharm is adding an unwanted semicolon. I don't know how to fix that.

 

Edit: It seems it only happens if the line ends in ':'.

 

I have uploaded via web form a small video called

pycharm_adds_semicolon.mp4

 

I just want how to disable such behaviour for this file type.

 

Thank you

9 comments
Comment actions Permalink

Hi, can you please export your whole IDE settings using File > Export settings... and upload them for me to take a look at? 

0
Comment actions Permalink

Thanks for the settings. Unfortunately I couldn't reproduce the issue - I've tried the same code as in your video, but the ";" character was never added in my case regardless of how I tried.

Is this issue happening only for .kv files? Have you tried in other file types? Have you tried other text editors?

Please ensure that you don't have any third-party macros/hotkey software running in the background, and try to disable any custom plugins you might have in PyCharm.

0
Comment actions Permalink

It happens also with .py files. Pressing enter within a line ending with ':'

0
Comment actions Permalink

And it happens in another projects, so it's not a per-project thing

0
Comment actions Permalink

Have you tried other editors? It looks like a system wide behavior, likely not related to IDE.

If the issue is only in PyCharm, try resetting all settings to default and check if it resolves the issue. The procedure is below:

1. Export your settings using **File > Export Settings...** command.
2. Delete PyCharm config and plugin directories, which can be located according to the following article: https://intellij-support.jetbrains.com/hc/en-us/articles/206544519
3. Restart PyCharm. It will start with default settings, like after fresh installation.
4. Open your project and try to reproduce the issue with the default settings.

After the test, you can import your previously exported settings back.

0
Comment actions Permalink

Well, it seems like doing all that did the trick.

 

Thanks. If I see this happening again, I'm commenting here.

0
Comment actions Permalink

Ok, then maybe it was some setting, like macro, or live template... although I don't know why it would behave like that. Sometime it's easier to just reset the settings.

0
Comment actions Permalink

I think I didn't ever set a macro. I don't know about templates, I made one live template for kivy tags, but didn't include ';'.

 

Thanks anyway. =:-)

0

Please sign in to leave a comment.