0
0
mirror of https://github.com/vim/vim.git synced 2025-08-25 19:53:53 -04:00

30 Commits

Author SHA1 Message Date
Jon Parise
dba9eb46e6
runtime(python): Also sync syntax at 'async def'
A file containing only async functions (`async def func()`) wouldn't
previously match the pythonSync pattern.

Also, this pattern only matches at the beginning of the line, so it
won't ever match method definitions (which are indented within class
scopes). Update the comment accordingly.

closes: #17963

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Zvezdan Petkovic <zpetkovic@acm.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-11 20:33:33 +02:00
Rob B
a94a0555d9
runtime(python): Highlight f-string replacement fields in Python
Highlight f-string replacement fields, including

- Comments
- Debugging flags
- Conversion fields
- Format specifications
- Delimiters

Syntax inside fields will be addressed in a separate commit.

related: #10734
related: #14033
closes: #17784

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Zvezdan Petkovic <zpetkovic@acm.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-10 10:35:31 +02:00
Jon Parise
48b7eb1ceb
runtime(python): Highlight classes as structures
Class and function definitions previously shared a single highlight
group (pythonFunction). This change gives classes their own highlight
group (pythonClass) that's linked to Structure.

closes: #17856

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Zvezdan Petkovic <zpetkovic@acm.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-08-10 10:32:41 +02:00
Rob B
b7fc24d3a3
runtime(python): Highlight f-strings in Python
fixes: #10734
fixes: #14033
closes: #17767

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Zvezdan Petkovic <zpetkovic@acm.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-17 21:26:05 +02:00
Rob B
a24f5be86d
runtime(python): highlight bytes in python
- Highlight bytes literals
- Do not highlight Unicode escape sequences in bytes literals

fixes: #14033
fixes: #17726
closes: #17728

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:30:59 +02:00
Zvezdan Petkovic
6f85cec4fb
runtime(python): update rendering of Unicode named literals in syntax script
This change:

* enforces that the alias starts with a letter
* allows the other words in an alias to be separated by either a space
  or a hyphen, but not both or double separators
* allows only a letter after space, possibly followed by letters or
  digits
* allows both letters and digits after a hyphen

Tested with:

    a = '\N{Cyrillic Small Letter Zhe} is pronounced as zh in pleasure'
    b = '\N{NO-BREAK SPACE} is needed here'
    # ... other tests here
    r = '\N{HENTAIGANA LETTER E-1} is a Japanese hiragana letter archaic ye'
    s = '\N{CUNEIFORM SIGN NU11 TENU} is a correction alias'
    t = '\N{RECYCLING SYMBOL FOR TYPE-1 PLASTICS} base shape is a triangle'
    print(a)
    print(b)
    print(r)
    print(s)
    print(t)

The tests confirm the behavior and are selected from real Unicode
tables/aliases to check these combinations based on the specification.

fixes: #17323
closes: #17735

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 08:23:24 +02:00
Bram Moolenaar
71badf9547 Update runtime files 2023-04-22 22:40:14 +01:00
Bram Moolenaar
dd60c365cd Update runtime files 2023-02-27 15:49:53 +00:00
Bram Moolenaar
2ecbe53f45 Update runtime files 2022-07-29 21:36:21 +01:00
Bram Moolenaar
0e6adf8a29 Update runtime files 2021-12-16 14:41:10 +00:00
Bram Moolenaar
9faec4e3d4 Update runtime files. 2021-02-27 16:38:07 +01:00
Bram Moolenaar
b4ada79aa7 Runtime file updates. 2016-10-30 21:55:26 +01:00
Bram Moolenaar
d07969093a Updated runtime files. 2016-09-16 20:02:31 +02:00
Bram Moolenaar
f37506f60f Updated runtime files. Remove HiLink commands. 2016-08-31 22:22:10 +02:00
Bram Moolenaar
89bcfda683 Updated runtime files. Remove version checks for Vim older than 6.0. 2016-08-30 23:26:57 +02:00
Bram Moolenaar
e4a3bcf28d Updated runtime files. Add Scala files. 2016-08-26 19:52:37 +02:00
Bram Moolenaar
6f1d9a096b Updated runtime files. 2016-07-24 14:12:38 +02:00
Bram Moolenaar
77cdfd1038 Updated runtime files. 2016-03-12 12:57:59 +01:00
Bram Moolenaar
ca63501fbc Update various runtime files. 2015-09-25 20:34:21 +02:00
Bram Moolenaar
f91328100d Updated and new runtime files. 2015-07-21 19:19:13 +02:00
Bram Moolenaar
541f92d6cf Updated runtime files. 2015-06-19 13:27:23 +02:00
Bram Moolenaar
07d87790f1 Update runtime files. Make matchparen plugin backwards compatible.
Add json filetype.
2014-07-19 14:04:47 +02:00
Bram Moolenaar
34700a6a15 Updated runtime files. 2013-03-07 13:20:54 +01:00
Bram Moolenaar
006590697c Updated runtime files. 2010-09-21 22:34:02 +02:00
Bram Moolenaar
5c73622a90 Update runtime files. 2010-01-06 20:54:52 +01:00
Bram Moolenaar
c81e5e79a0 updated for version 7.1a 2007-05-05 18:24:42 +00:00
Bram Moolenaar
1423b9d3b8 updated for version 7.0 2006-05-07 15:16:06 +00:00
Bram Moolenaar
9c102387af updated for version 7.0g02 2006-05-03 21:26:49 +00:00
Bram Moolenaar
e2f98b95c8 updated for version 7.0c03 2006-03-29 21:18:24 +00:00
Bram Moolenaar
071d4279d6 updated for version 7.0001 2004-06-13 20:20:40 +00:00