Skip to main content
added 174 characters in body
Source Link
abingham
  • 927
  • 6
  • 18

I use python-mode for my Python code, and every once in a while the syntax highlighter gets confused and thinks everything in the buffer is a string literal. This typically seems to happen when I create a docstring; for a few seconds after I type the quotes, everything after the cursor is highlighted as a string.

Is there any way to prevent this entirely? Or, if not, is there some way to make emacs/python-mode recover more quickly?

ed: To be clear, the incorrect highlighting persists even after the quotes have been closed and the buffer saved. But again, this is not every time, just sometimes.

I use python-mode for my Python code, and every once in a while the syntax highlighter gets confused and thinks everything in the buffer is a string literal. This typically seems to happen when I create a docstring; for a few seconds after I type the quotes, everything after the cursor is highlighted as a string.

Is there any way to prevent this entirely? Or, if not, is there some way to make emacs/python-mode recover more quickly?

I use python-mode for my Python code, and every once in a while the syntax highlighter gets confused and thinks everything in the buffer is a string literal. This typically seems to happen when I create a docstring; for a few seconds after I type the quotes, everything after the cursor is highlighted as a string.

Is there any way to prevent this entirely? Or, if not, is there some way to make emacs/python-mode recover more quickly?

ed: To be clear, the incorrect highlighting persists even after the quotes have been closed and the buffer saved. But again, this is not every time, just sometimes.

Source Link
abingham
  • 927
  • 6
  • 18

How can I prevent python-mode from occasionally highlighting everything as string

I use python-mode for my Python code, and every once in a while the syntax highlighter gets confused and thinks everything in the buffer is a string literal. This typically seems to happen when I create a docstring; for a few seconds after I type the quotes, everything after the cursor is highlighted as a string.

Is there any way to prevent this entirely? Or, if not, is there some way to make emacs/python-mode recover more quickly?