Re: [vim/vim] runtime/syntax/vim: Fix vimOper ordinal. (#7966)

2021-10-02 Fir de Conversatie Charles Campbell

Bram Moolenaar wrote:

Tsuyoshi CHO (Vim Github Repository) wrote:

@tsuyoshicho  pushed 1 commit.

   * 419101f
 

 vim operator syntax fix



Hello, Tsuyoshi:

Unfortunately, github is telling me that it can't find your commit.
Would you please send a diff to me and an example illustrating the issue.

Adding ".diff" often helps.  Strangely, on github there is no button for
this.

https://github.com/vim/vim/commit/419101fb03dd48e8c73f9a419db666577311542e.diff

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 1fd94752b79..25a4eb4698d 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -228,9 +228,9 @@ syn keyword vimAugroupKey contained aug[roup]
  " Operators: {{{2
  " =
  syn cluster   vimOperGroup
contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment
+syn match  vimOper "||\|&&\|[-+.!]"  skipwhite 
nextgroup=vimString,vimSpecFile
  syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}"  
  skipwhite nextgroup=vimString,vimSpecFile
  syn match vimOper "\(\"  
skipwhite nextgroup=vimString,vimSpecFile
-syn match  vimOper "||\|&&\|[-+.!]"  skipwhite 
nextgroup=vimString,vimSpecFile
  syn regionvimOperParenmatchgroup=vimParenSep  start="(" end=")" 
contains=vimoperStar,@vimOperGroup
  syn regionvimOperParenmatchgroup=vimSep   start="#\={" 
end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
  if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")


Hello, Bram!

So it seems that its a changing of priority for the matching, as he 
simply moved a line to an earlier point in the file. I'd still like an 
example if the OP would please provide one so I can put it into my test 
suite.


Chip Campbell

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/a8150720-e9da-3cc1-7528-0a6db796029d%40drchip.org.


Re: [vim/vim] runtime/syntax/vim: Fix vimOper ordinal. (#7966)

2021-10-02 Fir de Conversatie Bram Moolenaar


> Tsuyoshi CHO (Vim Github Repository) wrote:
> >
> > @tsuyoshicho  pushed 1 commit.
> >
> >   * 419101f
> > 
> > 
> > vim operator syntax fix
> >
> >
> Hello, Tsuyoshi:
> 
> Unfortunately, github is telling me that it can't find your commit. 
> Would you please send a diff to me and an example illustrating the issue.

Adding ".diff" often helps.  Strangely, on github there is no button for
this.

https://github.com/vim/vim/commit/419101fb03dd48e8c73f9a419db666577311542e.diff

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 1fd94752b79..25a4eb4698d 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -228,9 +228,9 @@ syn keyword vimAugroupKey contained aug[roup]
 " Operators: {{{2
 " =
 syn clustervimOperGroup
contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment
+syn match  vimOper "||\|&&\|[-+.!]"
skipwhite nextgroup=vimString,vimSpecFile
 syn match  vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}"  
skipwhite nextgroup=vimString,vimSpecFile
 syn match  vimOper "\(\" 
skipwhite nextgroup=vimString,vimSpecFile
-syn match  vimOper "||\|&&\|[-+.!]"
skipwhite nextgroup=vimString,vimSpecFile
 syn region vimOperParenmatchgroup=vimParenSep  start="(" end=")" 
contains=vimoperStar,@vimOperGroup
 syn region vimOperParenmatchgroup=vimSep   start="#\={" 
end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")

-- 
>From "know your smileys":
 8-O"Omigod!!" (done "rm -rf *" ?)

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///  \\\
\\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211002162234.B27E4C80053%40pakwach.


Re: [vim/vim] runtime/syntax/vim: Fix vimOper ordinal. (#7966)

2021-10-01 Fir de Conversatie Charles Campbell

Tsuyoshi CHO (Vim Github Repository) wrote:


@tsuyoshicho  pushed 1 commit.

  * 419101f

vim operator syntax fix



Hello, Tsuyoshi:

Unfortunately, github is telling me that it can't find your commit. 
Would you please send a diff to me and an example illustrating the issue.


Thank you,
Chip Campbell

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/ce025c64-cecc-9472-6cd3-759f39816b3c%40drchip.org.