zeertzjq
99a0b2f7b8
vim-patch:2cf18fc: runtime(python): Update syntax, improve pythonNumber pattern performance ( #38263 )
...
- Improve the performance of all pythonNumber patterns by unrolling
digit/underscore sequence loops.
- Split the float literal pattern into two simpler patterns.
fixes: vim/vim#19625 (Reported by James McCoy)
closes : vim/vim#19630
https://github.com/vim/vim/commit/2cf18fcc240030880bbd138e5174e436a3f20823
Co-authored-by: Doug Kearns <dougkearns@gmail.com >
2026-03-12 07:55:00 +08:00
zeertzjq
6543217afc
vim-patch:632fd8b: runtime(python): Highlight built-in constants in Python
...
Also add syntax tests for those newly constants.
closes : vim/vim#17788
closes : vim/vim#18922
https://github.com/vim/vim/commit/632fd8bb968b029d0a7c40a00101008ea5200b91
Co-authored-by: Rob B <github@0x7e.net >
2026-01-27 07:20:41 +08:00
zeertzjq
a278eebcfb
vim-patch:8d8c907: runtime(python): Highlight t-strings
...
- Highlight t-strings
- Update comments
- Add tests
closes : vim/vim#18679
https://github.com/vim/vim/commit/8d8c9074c3cbb33b2b8b97556bdb7267e2617b93
Co-authored-by: Rob B <github@0x7e.net >
2025-12-04 08:52:06 +08:00
zeertzjq
a9486fe7e1
vim-patch:900c747: runtime(python): fix 'type' syntax highlighting ( #35918 )
...
The previous patterns unintentionally highlighted words like 'typename'.
addresses: https://github.com/vim/vim/pull/18090#issuecomment-3333025523
closes : vim/vim#18394
https://github.com/vim/vim/commit/900c747da393b031f3347428fb640224ac2f5442
Co-authored-by: Jon Parise <jon@indelible.org >
2025-09-26 07:54:19 +08:00
zeertzjq
0f3fef9bab
vim-patch:15070ee: runtime(python): Update syntax, fix pythonEllipsis pattern ( #35724 )
...
fixes : vim/vim#18263
closes : vim/vim#18264
https://github.com/vim/vim/commit/15070eee2f1e11a69a4c2d99bad03c8f6756e6e0
Co-authored-by: Doug Kearns <dougkearns@gmail.com >
2025-09-12 00:17:04 +00:00
zeertzjq
12868474db
vim-patch:77cfc49: runtime(python): highlight ellipsis literals
...
The ellipsis literal (`...`) can be used in multiple contexts:
- Placeholders: `class Foo: ...`
- Containers: `Tuple[int, ...]`
- Assignments: `x = ...`
This is a trickier pattern to match because we can't rely on keyword
boundaries, so we instead look for exactly three dots (`...`).
This does mean that we will match the `...` portion of `x...x`, which
isn't valid Python syntax, but I think that's an acceptable trade-off
that avoids making this pattern much more complex.
Reference:
- https://docs.python.org/3/library/constants.html#Ellipsis
closes : vim/vim#18107
https://github.com/vim/vim/commit/77cfc49060a50daefd1675b8a1dece0e6e943384
Co-authored-by: Jon Parise <jon@indelible.org >
2025-09-09 11:39:23 +08:00
zeertzjq
53e78bec7c
vim-patch:6bb16d2: runtime(python): Update syntax file, fix f-string float highlighting
...
Fix matching of floats at the beginning of an f-string replacement
field, immediately after the opening brace.
The existing pattern, using `\zs`, cannot consume the already matched
`{` so use a lookbehind instead.
See comment: https://github.com/vim/vim/pull/17962#issuecomment-3201550443
closes : vim/vim#18220
https://github.com/vim/vim/commit/6bb16d2cee87f834f003bf368ce70c5688242ac1
Co-authored-by: Doug Kearns <dougkearns@gmail.com >
2025-09-09 11:37:12 +08:00
zeertzjq
b399a13f70
vim-patch:f1212a7: runtime(python): Do not match contained identifiers as pythonType
...
related: vim/vim#17962
closes : vim/vim#18206
https://github.com/vim/vim/commit/f1212a7b4554f2f544b581f7e819d6ef67c5e9ad
Co-authored-by: Rob B <github@0x7e.net >
2025-09-06 07:08:23 +08:00
zeertzjq
665d5d80ac
vim-patch:d2b28dd: runtime(python): add syntax support inside f-strings
...
fixes : vim/vim#14033
closes : vim/vim#17962
https://github.com/vim/vim/commit/d2b28ddfc2a7350c2f63b75d06cc53d17b3a66ff
Co-authored-by: Rob B <github@0x7e.net >
2025-09-06 07:07:34 +08:00
zeertzjq
98407a8b91
vim-patch:99964e2: runtime(python): support 'type's soft keyword form
...
`type` became a soft keyword in Python 3.12. In that form, it is a
statement that declares a type alias:
# type_stmt ::= 'type' identifier [type_params] "=" expression
type Point = tuple[float, float]
To implement support for this, this change does three things:
1. adds a `pythonType` group (linked to `Type`)
2. matches `type` followed by an identifier as `pythonStatement`
3. continues to match `type` in other forms as `pythonBuiltin`
Ref:
- https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
- https://docs.python.org/3/reference/simple_stmts.html#the-type-statement
closes : vim/vim#18090
https://github.com/vim/vim/commit/99964e2ea704465f25207c519fefb2bb6d6931bb
Co-authored-by: Jon Parise <jon@indelible.org >
2025-08-24 20:09:33 +08:00
zeertzjq
3d511833ae
vim-patch:2f7e4eb: runtime(python): optimize pythonSync pattern
...
Order the keywords by expected frequency: "def" and "class" are assumed
to be more likely than "async def" in the majority of Python code.
closes : vim/vim#18032
https://github.com/vim/vim/commit/2f7e4eb335df389d73aaeb2ff6879b233c1a293f
Co-authored-by: Jon Parise <jon@indelible.org >
2025-08-20 07:24:35 +08:00
zeertzjq
d19d2b4491
vim-patch:1ee1d9b: runtime(python): highlight "self" and "cls" in syntax script ( #35328 )
...
These are special names by convention, and giving them distinct
highlighting is a nice visual clue (using Identifier by default).
This group is named "pythonClassVar" to match the name used by
python-syntax. Some third-party color schemes are aware of this
name and customized their colors accordingly.
closes : vim/vim#17968
https://github.com/vim/vim/commit/1ee1d9b43da37b157a91662a312415e4db400ba9
Co-authored-by: Jon Parise <jon@indelible.org >
2025-08-14 08:36:24 +08:00
zeertzjq
e6e1e71abf
vim-patch:dba9eb4: runtime(python): Also sync syntax at 'async def' ( #35309 )
...
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 : vim/vim#17963
https://github.com/vim/vim/commit/dba9eb46e622efe39331b75d0c57c5d8b61b526f
Co-authored-by: Jon Parise <jon@indelible.org >
2025-08-12 20:11:38 +08:00
zeertzjq
39af96c8ef
vim-patch:a94a055: 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: vim/vim#10734
related: vim/vim#14033
closes : vim/vim#17784
https://github.com/vim/vim/commit/a94a0555d911da0d3bcd7e91d76c8e8ef03d9b0e
Co-authored-by: Rob B <github@0x7e.net >
2025-08-11 07:01:27 +08:00
zeertzjq
82a54a772b
vim-patch:48b7eb1: 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 : vim/vim#17856
https://github.com/vim/vim/commit/48b7eb1ceb16527640ce5853d876c432d7342532
Co-authored-by: Jon Parise <jon@indelible.org >
2025-08-11 07:00:50 +08:00
Christian Clason
9df9d3af3b
vim-patch:b7fc24d: runtime(python): Highlight f-strings in Python
...
fixes : vim/vim#10734
fixes : vim/vim#14033
closes : vim/vim#17767
https://github.com/vim/vim/commit/b7fc24d3a3d21ccf1461c703eb7ff07ef3994c54
Co-authored-by: Rob B <github@0x7e.net >
2025-07-18 10:33:05 +02:00
Christian Clason
d4c8e8df1c
vim-patch:a24f5be: runtime(python): highlight bytes in python
...
- Highlight bytes literals
- Do not highlight Unicode escape sequences in bytes literals
fixes : vim/vim#14033
fixes : vim/vim#17726
closes : vim/vim#17728
https://github.com/vim/vim/commit/a24f5be86d895981cb84266f98bae9f14407264b
Co-authored-by: Rob B <github@0x7e.net >
2025-07-15 00:14:00 +02:00
Christian Clason
444a8b3ec6
vim-patch:6f85cec: 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 : vim/vim#17323
closes : vim/vim#17735
https://github.com/vim/vim/commit/6f85cec4fbc1d1261c67a339a11792dd8f2efd14
Co-authored-by: Zvezdan Petkovic <zpetkovic@acm.org >
2025-07-13 11:07:40 +02:00
Christian Clason
e3f36377c1
vim-patch:71badf9547e8 ( #23285 )
...
Update runtime files
https://github.com/vim/vim/commit/71badf9547e8f89571b9a095183671cbb333d528
Co-authored-by: Bram Moolenaar <Bram@vim.org >
2023-04-23 15:22:55 +02:00
Christian Clason
66c384d4e8
vim-patch:partial:dd60c365cd26 ( #22437 )
...
vim-patch:partial:dd60c365cd26
Update runtime files
https://github.com/vim/vim/commit/dd60c365cd2630794be84d63c4fe287124a30b97
Co-authored-by: Bram Moolenaar <Bram@vim.org >
Skip: eval.txt, repeat.txt (needs `getscriptinfo()`)
2023-02-28 09:34:27 +01:00
Christian Clason
6237ac8402
vim-patch:2ecbe53f452e ( #19577 )
...
Update runtime files
https://github.com/vim/vim/commit/2ecbe53f452e92e941aff623f6a0b72f80e43d07
2022-07-30 15:48:32 +02:00
Christian Clason
b1757e1c29
vim-patch:0e6adf8a29d5 ( #16682 )
...
Update runtime files
https://github.com/vim/vim/commit/0e6adf8a29d5c2c96c42cc7157f71bf22c2ad471
2021-12-16 21:46:13 +01:00
Jan Edmund Lazo
6a8436065c
vim-patch:9faec4e3d439
...
Update runtime files.
https://github.com/vim/vim/commit/9faec4e3d439968e21ad74e917aebb289df8f849
Omit vim9.
2021-05-02 10:23:35 -04:00
Justin M. Keyes
789c46934b
vim-patch:b4ada79aa7d0
...
Runtime file updates.
https://github.com/vim/vim/commit/b4ada79aa7d0d1e5da3a659b1a203d7cae9f7f59
Closes #5055
2017-04-29 01:51:56 +02:00
Justin M. Keyes
06879e2e89
vim-patch:d07969093a9b
...
Updated runtime files.
https://github.com/vim/vim/commit/d07969093a9b3051511c478d71c36de6fc33c0d6
2017-04-28 22:51:30 +02:00
Justin M. Keyes
86b596dc7a
vim-patch:f37506f60f87
...
Updated runtime files. Remove HiLink commands.
https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
2017-04-28 21:25:15 +02:00
Justin M. Keyes
a53409b564
vim-patch:89bcfda6834a
...
Updated runtime files. Remove version checks for Vim older than 6.0.
https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
2017-04-28 21:13:55 +02:00
Justin M. Keyes
d194380de9
vim-patch:e4a3bcf28d92
...
Updated runtime files. Add Scala files.
https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
2017-04-19 21:26:17 +02:00
Shougo Matsushita
6ba3b85382
vim-patch:6f1d9a
...
Updated runtime files.
https://github.com/vim/vim/commit/6f1d9a096bf22d50c727dca73abbfb8e3ff55176
2017-01-02 10:45:10 +09:00
James McCoy
ea18b4a60f
vim-patch:77cdfd1
...
Updated runtime files.
https://github.com/vim/vim/commit/77cdfd10382e01cc51f4ba1a9177032351843151
Ignore changes to:
* doc/channel.txt, doc/eval.txt: Channel related docs
* doc/options.txt: GUI related docs
* doc/tags: Generated at build time
* doc/todo.txt: Irrelevant for Neovim
2016-07-08 01:43:36 -04:00
David Barnett
0d264abdd0
vim-patch:ca63501
...
Update various runtime files.
https://github.com/vim/vim/commit/ca63501fbcd1cf9c8aa9ff12c093c95b62a89ed7
2016-04-18 21:36:16 -07:00
watiko
15b5bb038b
vim-patch:f913281
...
Updated and new runtime files.
https://github.com/vim/vim/commit/f91328100db34996ed7e7a800bed0a30ff0890dd
2016-03-29 21:58:28 +09:00
David Barnett
cc52060245
vim-patch:541f92 #4173
...
Updated runtime files.
https://github.com/vim/vim/commit/541f92
2016-02-07 01:13:30 -05:00
Victor Adam
6e233b93ea
runtime: fix for python highlighting #3154
...
"""\"""" was highlighted incorrectly. The fix is simply adding skip=+\\["']+ to
the syntax of triple-quoted strings.
Closes #3151
2015-08-31 02:54:39 -04:00
Justin M. Keyes
a98a6996c2
re-integrate runtime/ vim-patch:0 #938
...
Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7
Excluding:
Amiga icons (*.info, icons/)
doc/hangulin.txt
tutor/
spell/
lang/ (only used for menu translations)
macros/maze/, macros/hanoi/, macros/life/, macros/urm/
These were used to test vi compatibility.
termcap
"Demonstration of a termcap file (for the Amiga and Archimedes)"
Helped-by: Rich Wareham <rjw57@cam.ac.uk >
Helped-by: John <john.schmidt.h@gmail.com >
Helped-by: Yann <yann@yann-salaun.com >
Helped-by: Christophe Badoit <c.badoit@lesiteimmo.com >
Helped-by: drasill <github@tof2k.com >
Helped-by: Tae Sandoval Murgan <taecilla@gmail.com >
Helped-by: Lowe Thiderman <lowe.thiderman@gmail.com >
2014-07-29 02:12:31 +00:00