[vim/vim] Keywords 'of' and 'yield' for Javascript. (#7873)

11 views
Skip to first unread message

Yuri Klimov

unread,
Feb 19, 2021, 6:28:44 AM2/19/21
to vim/vim, Subscribed

New Javascript language keywords 'of' (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) and 'yield' (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/yield) are added to syntax file runtime/syntax/javascript.vim.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/7873

Commit Summary

  • Keyword 'of' in for...of statement.
  • Keyword 'yield' for generator function.

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

codecov[bot]

unread,
Feb 19, 2021, 6:31:31 AM2/19/21
to vim/vim, Subscribed

Codecov Report

Merging #7873 (5e95e16) into master (d3f8a9e) will decrease coverage by 86.54%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@

##           master    #7873       +/-   ##

===========================================

- Coverage   89.03%    2.49%   -86.55%     

===========================================

  Files         148      146        -2     

  Lines      164974   159854     -5120     

===========================================

- Hits       146891     3989   -142902     

- Misses      18083   155865   +137782     
Flag Coverage Δ
huge-clang-none ?
huge-gcc-none ?
huge-gcc-testgui ?
huge-gcc-unittests 2.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/sha256.c 0.00% <0.00%> (-97.96%) ⬇️
src/digraph.c 0.00% <0.00%> (-97.78%) ⬇️
src/gui_gtk_f.c 0.00% <0.00%> (-97.54%) ⬇️
src/crypt_zip.c 0.00% <0.00%> (-97.06%) ⬇️
src/evalbuffer.c 0.00% <0.00%> (-96.81%) ⬇️
src/debugger.c 0.00% <0.00%> (-96.62%) ⬇️
src/libvterm/src/rect.h 0.00% <0.00%> (-96.56%) ⬇️
src/cmdhist.c 0.00% <0.00%> (-96.07%) ⬇️
src/eval.c 0.10% <0.00%> (-96.01%) ⬇️
src/evalfunc.c 0.00% <0.00%> (-96.00%) ⬇️
... and 134 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3f8a9e...f516610. Read the comment docs.

Bram Moolenaar

unread,
Feb 19, 2021, 2:01:20 PM2/19/21
to vim/vim, Subscribed

Have you contacted the maintainer, Claudio Fleiner?

Yuri Klimov

unread,
Feb 19, 2021, 2:32:12 PM2/19/21
to vim/vim, Subscribed

Yes, but there was no response for 2 weeks...

Dagan Martinez

unread,
Apr 23, 2023, 2:07:39 PM4/23/23
to vim/vim, Subscribed

Please god somebody merge this - not having 'of' highlighted has bothered me for years


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/7873/c1519123424@github.com>

Christian Brabandt

unread,
Aug 17, 2023, 6:03:55 PM8/17/23
to vim/vim, Subscribed

let me merge this


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/7873/c1683036907@github.com>

Christian Brabandt

unread,
Aug 17, 2023, 6:03:57 PM8/17/23
to vim/vim, Subscribed

Merged #7873 into master.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/7873/issue_event/10124286267@github.com>

Christian Brabandt

unread,
Aug 17, 2023, 6:15:12 PM8/17/23
to vim...@googlegroups.com
Keywords 'of' and 'yield' for Javascript. (#7873)

Commit: https://github.com/vim/vim/commit/a5988f582e482150023862052d41e5215253a3de
Author: Yuri Klimov <yu...@klimov.net>
Date: Fri Aug 18 01:03:23 2023 +0300

Keywords 'of' and 'yield' for Javascript. (https://github.com/vim/vim/issues/7873)

* Keyword 'of' in for...of statement.

* Keyword 'yield' for generator function.

diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim
index e51313798..cb2d16e2a 100644
--- a/runtime/syntax/javascript.vim
+++ b/runtime/syntax/javascript.vim
@@ -52,11 +52,11 @@ syn match javaScriptNumber "\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\([eE]
syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline

syn keyword javaScriptConditional if else switch
-syn keyword javaScriptRepeat while for do in
+syn keyword javaScriptRepeat while for do in of
syn keyword javaScriptBranch break continue
syn keyword javaScriptOperator new delete instanceof typeof
syn keyword javaScriptType Array Boolean Date Function Number Object String RegExp
-syn keyword javaScriptStatement return with await
+syn keyword javaScriptStatement return with await yield
syn keyword javaScriptBoolean true false
syn keyword javaScriptNull null undefined
syn keyword javaScriptIdentifier arguments this var let
Reply all
Reply to author
Forward
0 new messages