#1572 Python lexer: Expose escaped characters

Feature_Request
open
Neil Hodgson
3
2014-01-21
2014-01-21
Ram Rachum
No

It would be really awesome if the Python lexer could show, inside Python strings, any escape sequences.

For example, in this string:

'H\\ello\t folks!\r\n'

The \, \t, \r, and \n will have a different color.

Is this possible? It would make working with Python strings easier.

Also keep in mind that the lexer will need to look at whether the string is raw, i.e. prefixed by r, in which case there's no escaping (I think).

Discussion

  • Neil Hodgson
    Neil Hodgson
    2014-01-21

    I would not want this to be the default behaviour since escapes are a relatively uninteresting part of string syntax. If you want to implement this it should be an option and default to off.

     
  • Neil Hodgson
    Neil Hodgson
    2014-01-21

    • labels: --> scintilla, lexer, python
    • assigned_to: Neil Hodgson
    • Priority: 5 --> 3