[vim/vim] Editing a Groovy file causes Vim to throw an error - E945: Range too large in character class (#7280)

123 views
Skip to first unread message

Dan

unread,
Nov 11, 2020, 6:54:24 AM11/11/20
to vim/vim, Subscribed

Describe the bug

When I edit a Groovy file Vim throws an error:

"foo.groovy" [New]
Error detected while processing BufNewFile Autocommands for "*.groovy"..FileType Autocommands for "*"..Syntax Autocommands for "*"..function <SNR>6_SynSet[25]..script /opt/local/share/vim/vim82/syntax/groovy.vim:
line  256:
E945: Range too large in character class
Press ENTER or type command to continue

To Reproduce

Just run: vim foo.groovy

Expected behavior

Nice syntax highlighting and no errors :)

Environment:

  • Vim version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct  2 2020 14:07:35)
macOS version
Included patches: 1-1719
Compiled by MacPorts
Huge version without GUI.  Features included (+) or not (-):
+acl               -farsi             +mouse_sgr         +tag_binary
+arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
+autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
+autochdir         +float             +mouse_xterm       -tcl
-autoservername    +folding           +multi_byte        +termguicolors
-balloon_eval      -footer            +multi_lang        +terminal
+balloon_eval_term +fork()            -mzscheme          +terminfo
-browse            +gettext           +netbeans_intg     +termresponse
++builtin_terms    -hangul_input      +num64             +textobjects
+byte_offset       +iconv             +packages          +textprop
+channel           +insert_expand     +path_extra        +timers
+cindent           +ipv6              -perl              +title
-clientserver      +job               +persistent_undo   -toolbar
+clipboard         +jumplist          +popupwin          +user_commands
+cmdline_compl     +keymap            +postscript        +vartabs
+cmdline_hist      +lambda            +printer           +vertsplit
+cmdline_info      +langmap           +profile           +virtualedit
+comments          +libcall           -python            +visual
+conceal           +linebreak         +python3           +visualextra
+cryptv            +lispindent        +quickfix          +viminfo
-cscope            +listcmds          +reltime           +vreplace
+cursorbind        +localmap          +rightleft         +wildignore
+cursorshape       +lua               -ruby              +wildmenu
+dialog_con        +menu              +scrollbind        +windows
+diff              +mksession         +signs             +writebackup
+digraphs          +modify_fname      +smartindent       -X11
-dnd               +mouse             -sound             -xfontset
-ebcdic            -mouseshape        +spell             -xim
+emacs_tags        +mouse_dec         +startuptime       -xpm
+eval              -mouse_gpm         +statusline        -xsmp
+ex_extra          -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+extra_search      +mouse_netterm     +syntax            -xterm_save
   system vimrc file: "/opt/local/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/opt/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H   -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -DMACOS_X -DMACOS_X_DARWIN  -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: /usr/bin/clang   -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64 -o vim        -lm  -lncurses -liconv -lintl -framework AppKit  -L/opt/local/lib -llua   -L/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -framework CoreFoundation
  • OS:
$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G6032
  • Terminal:

Built in OS X Terminal Version 2.9.5 (421.2)

Additional context

I installed Vim via MacPorts: vim @8.2.1719_0+huge+lua+python37

The version information given at the head of the /opt/local/share/vim/vim82/syntax/groovy.vim is as follows:

" Vim syntax file
" Language:	Groovy
" Original Author:	Alessio Pace <billy.corgan AT tiscali.it>
" Maintainer:	Tobias Rapp <yahuxo+vim AT mailbox.org>
" Version: 	0.1.17
" URL:	  http://www.vim.org/scripts/script.php?script_id=945
" Last Change:	2020 May 26

Commenting out line 256 fixes the issue. However, I'm guessing that someone who knows what they are doing could provide a better fix!!


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

Christian Brabandt

unread,
Nov 11, 2020, 7:09:11 AM11/11/20
to vim/vim, Subscribed

can you please contact the maintainer of the syntax file for this error?

lacygoill

unread,
Nov 11, 2020, 10:18:49 AM11/11/20
to vim/vim, Subscribed

Just run: vim foo.groovy

I can't reproduce:

gif

Maxim Kim

unread,
Nov 11, 2020, 10:24:18 AM11/11/20
to vim/vim, Subscribed

Just run: vim foo.groovy

Can't reproduce.

Dan

unread,
Nov 11, 2020, 10:48:46 AM11/11/20
to vim/vim, Subscribed

@habamax @lacygoill

Just saying that you can't reproduce without giving some more info about your environments is not especially helpful.

I CAN reproduce this error running vim foo.groovy using Vim 8.2 on OS X

I CANNOT reproduce this error running vim foo.groovy using Vim 8.1 on Debian 10

If you cannot reproduce this and are using Vim 8.2 on OS X then that would of course be something worth knowing...

Maxim Kim

unread,
Nov 11, 2020, 10:56:18 AM11/11/20
to vim/vim, Subscribed

Just saying that you can't reproduce without giving some more info about your environments is not especially helpful.

Well, now we know that you have no problem in debian 10 using vim 8.1. :)

Now the question whether this because you have different vim config there or the vim version or OS? Have you tried it with vim --clean?

PS, I have no issue opening vim foo.groovy:

  1. on windows 10, gvim or vim
  2. on WSL debian 10

Both have vim version 8.2.1975

Christian Brabandt

unread,
Nov 11, 2020, 11:01:22 AM11/11/20
to vim/vim, Subscribed

Can you please also check your encoding?

lacygoill

unread,
Nov 11, 2020, 11:03:13 AM11/11/20
to vim/vim, Subscribed

Just saying that you can't reproduce without giving some more info about your environments is not especially helpful.

It is helpful; it lets you know that you didn't post a minimal working example, which the issue template asked for:

To Reproduce
Detailed steps to reproduce the behavior:

  1. Run vim --clean (or gvim --clean, etc.)

I can't reproduce on Vim 8.2.1973 and Ubuntu 16.04.

Dominique Pellé

unread,
Nov 11, 2020, 11:03:45 AM11/11/20
to vim/vim, Subscribed

At first I could not reproduce it either, but then I managed to reproduce using:

:set re=1
:e /tmp/foo.groovy

And I got:

Error detected while processing BufNewFile Autocommands for "*.groovy"..FileType
 Autocommands for "*"..Syntax Autocommands for "*"..function <SNR>10_SynSet[25].
.script /usr/local/share/vim/vim82/syntax/groovy.vim:
line  256:
E945: Range too large in character class

Somehow the regexp works with the new engine but not the old one.

This reproduces it:

$ vim --clean -c 'set re=0' -c '/[a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE0-9_.]\?'
(no error)

$ vim --clean -c 'set re=1' -c '/[a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE0-9_.]\?'
Error detected while processing command line:
E945: Range too large in character class

This is on Linux x86-64, Vim-8.2.1975 (huge).

A workaround should be have this in your ~/.vimrc:

set re=0

Maxim Kim

unread,
Nov 11, 2020, 11:07:42 AM11/11/20
to vim/vim, Subscribed

A workaround should be have this in your ~/.vimrc:

set re=0

Isn't it default value?

Dominique Pellé

unread,
Nov 11, 2020, 11:32:56 AM11/11/20
to vim/vim, Subscribed

@habamax wrote:

set re=0
Isn't it default value?

Yes, but I suppose that the bug submitter is not using the default value i.e. he has set re=1 (or set regexpengine=1) in his ~/.vimrc.

Christian Brabandt

unread,
Nov 11, 2020, 11:34:28 AM11/11/20
to vim/vim, Subscribed

so perhaps insert an \%#=2 before that pattern? Like this:

diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim
index 9bc1bd6d8..ad4538da5 100644
--- a/runtime/syntax/groovy.vim
+++ b/runtime/syntax/groovy.vim
@@ -253,7 +253,7 @@ if exists("groovy_regex_strings")
 endif
 " syn region groovyELExpr start=+${+ end=+}+ keepend contained
 syn match groovyELExpr /\${.\{-}}/ contained
-syn match groovyELExpr /\$[a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE_][a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE0-9_.]*/ contained
+syn match groovyELExpr /\%#=2\$[a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE_][a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE0-9_.]*/ contained
 hi def link groovyELExpr Identifier

 " TODO: better matching. I am waiting to understand how it really works in groovy

Anybody wants to notify the maintainer?

Maxim Kim

unread,
Nov 11, 2020, 11:34:49 AM11/11/20
to vim/vim, Subscribed

Yes, but I suppose that the bug submitter is not using the default value i.e. he has set re=1 (or set regexpengine=1) in his ~/.vimrc.

Which would probably be clear if OP used vim --clean I guess? :)

Dan

unread,
Nov 11, 2020, 11:35:49 AM11/11/20
to vim/vim, Subscribed

Apologies - I missed the vim --clean instruction.

@dpelle is right. Thank you for finding the cause.

I have set regexpengine=1 in my .vimrc. I had this set as using the old regex engine was supposedly faster with Ruby files.

As @habamax pointed out the default is set regexpengine=0. Commenting out set regexpengine=1 or explicitly setting set regexpengine=0 fixes the issue.

I have the exact same setting in my .vimrc on my Debian box. However, this has a different version of the groovy Vim syntax file (0.1.16) - without the troublesome regexp.

Dan

unread,
Nov 11, 2020, 11:39:14 AM11/11/20
to vim/vim, Subscribed

so perhaps insert an %#=2 before that pattern?

I've just tried that (with set re=1 in my .vimrc) and I no longer get the error

Bram Moolenaar

unread,
Nov 11, 2020, 2:17:15 PM11/11/20
to vim/vim, Subscribed

I don't think we are going to add the regexp engine selection to all the syntax file patterns.
You can ask the groovy file maintainer if he wants to add it to this specific pattern, but I don't see a reason to keep this Vim issue open.

Bram Moolenaar

unread,
Nov 11, 2020, 2:17:17 PM11/11/20
to vim/vim, Subscribed

Closed #7280.

Hannes Achleitner

unread,
Jan 29, 2021, 2:34:06 AM1/29/21
to vim/vim, Subscribed

vim --version shows me

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Nov 23 2020 06:06:20)
macOS version
Included patches: 1-850
Compiled by ro...@apple.com

cat ~/.vimrc looks like

set number
set nocompatible
set spell spelllang=en_us
syntax on
colo default
set re=1

But I still get this
image

Christian Brabandt

unread,
Jan 29, 2021, 3:15:31 AM1/29/21
to vim/vim, Subscribed

can you check if this still happens with updated runtime files? Have you contacted the runtime file maintainer?

Hannes Achleitner

unread,
Jan 29, 2021, 3:21:59 AM1/29/21
to vim/vim, Subscribed

can you check if this still happens with updated runtime files?

Sorry, you have to explain. How to update runtime files on a macOS ?

Christian Brabandt

unread,
Jan 29, 2021, 3:31:57 AM1/29/21
to vim/vim, Subscribed

for one, you could simply copy over the groovy syntax file from this repository and see if this helps.

Hannes Achleitner

unread,
Jan 29, 2021, 3:52:23 AM1/29/21
to vim/vim, Subscribed

for one, you could simply copy over the groovy syntax file from this repository and see if this helps.

This is a difficult task for someone who is absolute new to this vim-error-searching
I'm just a vim user !

I neither found artifacts in master-Github-action build , nor in release

You have to tell me which file(s) I've to copy to where

lacygoill

unread,
Jan 29, 2021, 6:02:51 AM1/29/21
to vim/vim, Subscribed

'regexpengine' is only meant to be reset while debugging some issue with a regex:

https://github.com/vim/vim/blob/df2c2988bbaecd28b0fbec8d64327b1bbb005e19/runtime/doc/options.txt#L5974-L5975

Remove this line from your vimrc:

set re=1

You have to tell me which file(s) I've to copy to where

The groovy syntax file has not been updated since the issue was posted; copying it won't help you.

Christian Brabandt

unread,
Jan 29, 2021, 6:09:11 AM1/29/21
to vim/vim, Subscribed

it might have been updated since 8.2.950, which is the version @hannesa2 is using. a test won't hurt, simply copy https://github.com/vim/vim/blob/master/runtime/syntax/groovy.vim to ~/.vim/syntax/ (create non-existing directories).

But I agree, setting the regexpengine should not be needed in general.

Dan

unread,
Jan 29, 2021, 7:18:41 AM1/29/21
to vim/vim, Subscribed

Just to confirm:

  • Deleting set re=1 from my .vimrc fixed the issue for me - this is the 'correct' way to fix this.

    • I had set re=1 in my .vimrc to work around an old issue with Ruby syntax highlighting that has since been fixed.
    • I simply forgot to remove the workaround after the issue was fixed.
  • Adding \%#=2 to the runtime/syntax/groovy as per chrisbra's suggestion above also fixed the issue when I still had set re=1 in my .vimrc.

    • You only need to apply this if for some reason you really need to use set re=1.
    • As per brammool's comment this fix was not going to be added to the groovy syntax file.

Marc Samendinger

unread,
Jan 29, 2021, 9:57:43 AM1/29/21
to vim/vim, Subscribed

Editing a groovy file throws the same error for me and adding set regexpengine=0 to my .vimrc fixes it.

What I don't understand is, if I remove set regexpengine from my .vimrc it seems to default to 1, while the comments in this issue suggest that the default should be 0.

Is there any other setting that could have an effect on the regexpengine version?

15:43 $ grep 'set re' ~/.vimrc
:  autocmd BufEnter,FocusGained,InsertLeave * set relativenumber

VIM version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 29 2020 23:33:57)
macOS version
Included patches: 1-850
Compiled by ro...@apple.com
Normal version without GUI.  Features included (+) or not (-):
+acl               -farsi             +mouse_sgr         +tag_binary
-arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
+autocmd           +find_in_path      -mouse_urxvt       -tag_any_white
+autochdir         +float             +mouse_xterm       -tcl
-autoservername    +folding           +multi_byte        -termguicolors
-balloon_eval      -footer            +multi_lang        +terminal
-balloon_eval_term +fork()            -mzscheme          +terminfo
-browse            -gettext           +netbeans_intg     +termresponse
+builtin_terms     -hangul_input      +num64             +textobjects
+byte_offset       +iconv             +packages          +textprop
+channel           +insert_expand     +path_extra        +timers
+cindent           -ipv6              -perl              +title
-clientserver      +job               +persistent_undo   -toolbar
+clipboard         +jumplist          +popupwin          +user_commands
+cmdline_compl     -keymap            +postscript        -vartabs
+cmdline_hist      +lambda            +printer           +vertsplit
+cmdline_info      -langmap           -profile           +virtualedit
+comments          +libcall           +python/dyn        +visual
-conceal           +linebreak         -python3           +visualextra
+cryptv            +lispindent        +quickfix          +viminfo
+cscope            +listcmds          +reltime           +vreplace
+cursorbind        +localmap          -rightleft         +wildignore
+cursorshape       -lua               +ruby/dyn          +wildmenu
+dialog_con        +menu              +scrollbind        +windows
+diff              +mksession         +signs             +writebackup
+digraphs          +modify_fname      +smartindent       -X11
-dnd               +mouse             -sound             -xfontset
-ebcdic            -mouseshape        +spell             -xim
-emacs_tags        -mouse_dec         +startuptime       -xpm
+eval              -mouse_gpm         +statusline        -xsmp
+ex_extra          -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+extra_search      -mouse_netterm     +syntax            -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -o vim        -lm -lncurses  -liconv -framework Cocoa

Christian Brabandt

unread,
Jan 29, 2021, 11:05:31 AM1/29/21
to vim/vim, Subscribed

What I don't understand is, if I remove set regexpengine from my .vimrc it seems to default to 1, while the comments in this issue suggest that the default should be 0.

No, the default is clearly documented to be 0, see e.g. in the documentation https://vimhelp.org/options.txt.html#'regexpengine'

Or type :h 'regexpengine' in your vim

Christian Brabandt

unread,
Jan 29, 2021, 11:07:36 AM1/29/21
to vim/vim, Subscribed

What could happen (and what has just been recently adjusted in a patch), that sometimes with :set regexpengine=0 Vim silently switches to the old engine (regexpengine=1), without the user noting. This has recently been changed for collations and ranges.

Marc Samendinger

unread,
Jan 30, 2021, 7:21:51 AM1/30/21
to vim/vim, Subscribed

No, the default is clearly documented to be 0, see e.g. in the documentation https://vimhelp.org/options.txt.html#'regexpengine'

Sorry, I never wanted to question that the default is really 0, i wanted to understand why my installation, even though i cant find setting the regexpengine in any config files, starts with regexpengine=1.

My thoughts were that there might be another setting that influences the regexpengine, I've overlooked a config file that ist not mentioned in the vim --version output or a plugin can change the setting.

lacygoill

unread,
Jan 30, 2021, 7:24:53 AM1/30/21
to vim/vim, Subscribed

If you still have this issue, use the :verbose modifier to ask Vim what is the last script file which has altered the option:

set re?

lacygoill

unread,
Jan 30, 2021, 7:25:27 AM1/30/21
to vim/vim, Subscribed

I forgot :verbose:

verbose set re?
^-----^

Marc Samendinger

unread,
Feb 1, 2021, 6:26:18 AM2/1/21
to vim/vim, Subscribed

Thank you, I didn't know that verbose can tell me where a setting was altered. But in this case it doesn't help me.
Running vim --clean and :verbose set re? only tells me regexpengine=1 while it works for other settings that got altered by config files.

Marc Samendinger

unread,
Feb 1, 2021, 9:26:19 AM2/1/21
to vim/vim, Subscribed

Compiling vim from source doesn't show this behaviour 🤔

Dominique Pellé

unread,
Feb 1, 2021, 9:51:30 AM2/1/21
to vim/vim, Subscribed

@msamendinger wrote:

Compiling vim from source doesn't show this behaviour

Yes it does. Building vim-8.2.2445 (latest in git repo):

$ cd vim/src
$ ./vim --clean -c 'set re=1' -c 'e foo.groovy'
...snip...
E945: Range too large in character class

There is a lot of discussion for something which is a known problem.
The maintainer of Groovy should apply the patch from
@chrisbra i.e. #7280 (comment)
if we accept that the old regexp engine won't be changed to support
this kind of regexp.

Marc Samendinger

unread,
Feb 1, 2021, 10:01:40 AM2/1/21
to vim/vim, Subscribed

Again I haven't been very clear, sorry.

Running vim --clean and :verbose set re? only tells me regexpengine=1

Running the apple compiled vim with my config results in regexpengine=1, running my self compiled vim results in regexpengine=0 with my configuration.

Christian Brabandt

unread,
Feb 1, 2021, 11:06:04 AM2/1/21
to vim/vim, Subscribed

so does the apple vim set the regexpengine=1 anywhere in its configuration files? So what does :verbose :set regexpengine? output in the vim that comes from Apple?

Christian Brabandt

unread,
Feb 1, 2021, 11:07:11 AM2/1/21
to vim/vim, Subscribed

If this just outputs: regexpengine=1 that hints that Apple patches the default value in the C files and does not set this setting via a configuration file, which sounds strange.

Bram Moolenaar

unread,
Feb 1, 2021, 12:40:36 PM2/1/21
to vim...@googlegroups.com, Christian Brabandt


> If this just outputs: `regexpengine=1` that hints that Apple patches
> the default value in the C files and does not set this setting via a
> configuration file, which sounds strange.

Yes, I just checked and "/usr/bin/vi -u NONE" has 'regexpengine' set to
one. This is with Vim 8.1.2292.

Please file a bug with Apple.

--
Facepalm statement #5: "Petrol getting more expensive? Not for me, I'm always
tanking for 20 dollars"

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Marc Samendinger

unread,
Feb 1, 2021, 3:28:13 PM2/1/21
to vim/vim, Subscribed

What I tried was to grep for set re in all the rc files shown in vim --version output. Theres no match.
And running :verbose :set regexpengine? only outputs regexpengine=1, not sure though where to get more information on how apple builds their vim. I asked some colleagues to test their installations.

render1612210735334

Yegappan Lakshmanan

unread,
Feb 1, 2021, 4:23:33 PM2/1/21
to vim_dev, reply+ACY5DGDK7FQIMEJHFH...@reply.github.com, vim/vim, Subscribed
Hi,

On Mon, Feb 1, 2021 at 12:28 PM Marc Samendinger <vim-dev...@256bit.org> wrote:

What I tried was to grep for set re in all the rc files shown in vim --version output. Theres no match.
And running :verbose :set regexpengine? only outputs regexpengine=1, not sure though where to get more information on how apple builds their vim. I asked some colleagues to test their installations.


Based on the code below (search for regexpengine):


It looks like Apple did change the default value for the 'regexpengine' option to 1.

- Yegappan 

vim-dev ML

unread,
Feb 1, 2021, 4:23:56 PM2/1/21
to vim/vim, vim-dev ML, Your activity

Marc Samendinger

unread,
Feb 1, 2021, 4:56:32 PM2/1/21
to vim/vim, vim-dev ML, Comment

Based on the code below (search for regexpengine):
https://opensource.apple.com/source/vim/vim-91.80.1/src/optiondefs.h.auto.html
It looks like Apple did change the default value for the 'regexpengine'
option to 1.

Thanks, this not only explains the behaviour but in addition I learned about opensource.apple.com


You are receiving this because you commented.

Christian Brabandt

unread,
Feb 2, 2021, 2:31:40 AM2/2/21
to vim/vim, vim-dev ML, Comment

can you please report this as a bug to Apple? And perhaps also notify the runtime file maintainer so he can fix it on his side as well?

Thanks.

Marc Samendinger

unread,
Feb 2, 2021, 2:26:36 PM2/2/21
to vim/vim, vim-dev ML, Comment

I filed a bug with apple and notified the maintainer. Will report back.

Tim Black

unread,
Feb 4, 2021, 10:28:30 AM2/4/21
to vim/vim, vim-dev ML, Comment

Hm, I'm seeing this behavior on Debian 9.12, with vim 8.0 (full version below), and in my case running :verbose set regexpengine? exposed an ftplugin that was setting regexpengine=1:

        Last set from ~/dotfiles/vim/.vim/pack/timblaktu/start/ansible-vim/ftplugin/ansible.vim

So, in my case, I suppose the answer is to make sure ftplugin/ansible.vim isn't running for groovy files..

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 16 2018 17:48:09)
Included patches: 1-1428
Compiled by timb...@gmail.com
Huge version without GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    -tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    -gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               +perl              +vertsplit
-clipboard         +jumplist          +persistent_undo   +virtualedit
+cmdline_compl     +keymap            +postscript        +visual
+cmdline_hist      +lambda            +printer           +visualextra
+cmdline_info      +langmap           +profile           +viminfo
+comments          +libcall           +python/dyn        +vreplace
+conceal           +linebreak         +python3/dyn       +wildignore
+cryptv            +lispindent        +quickfix          +wildmenu
+cscope            +listcmds          +reltime           +windows
+cursorbind        +localmap          +rightleft         +writebackup
+cursorshape       -lua               +ruby              -X11
+dialog_con        +menu              +scrollbind        -xfontset
+diff              +mksession         +signs             -xim
+digraphs          +modify_fname      +smartindent       -xpm
-dnd               +mouse             +startuptime       -xsmp
-ebcdic            -mouseshape        +statusline        -xterm_clipboard
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_save
+eval              -mouse_gpm         +syntax
+ex_extra          -mouse_jsbterm     +tag_binary
+extra_search      +mouse_netterm     +tag_old_static
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/stow/vim/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E   -L/usr/local/lib -Wl,--as-needed -o vim        -lm -ltinfo -lnsl    -ldl   -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.24/CORE -lperl -ldl -lm -lpthread -lcrypt    -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm

Christian Brabandt

unread,
Feb 4, 2021, 10:32:45 AM2/4/21
to vim/vim, vim-dev ML, Comment

regexpengine=1
Last set from ~/dotfiles/vim/.vim/pack/timblaktu/start/ansible-vim/ftplugin/ansible.vim

I think you should report that to the maintainer of the ftplugin. I don't think filetype plugins should set the regexpengine setting, that is more for users to set globally.

Christian Brabandt

unread,
Feb 4, 2021, 10:34:32 AM2/4/21
to vim/vim, vim-dev ML, Comment

Ah, looks like this has already been taken care of: pearofducks/ansible-vim@19e6ae0

Tim Black

unread,
Feb 4, 2021, 5:56:56 PM2/4/21
to vim/vim, vim-dev ML, Comment

Thanks for that. Indeed, updating that plugin to latest 3.0 tag seems to prevent the error.. so far. It was somewhat intermittent to begin with, but I believe it was happening lately bc I've been working in a vim session with several windows, editing both .yml and .groovy at the same time..

Marc Samendinger

unread,
Feb 25, 2021, 2:42:23 PM2/25/21
to vim/vim, vim-dev ML, Comment

I filed a bug with apple and notified the maintainer. Will report back.

EDIT: Tobias the maintainer of the groovy syntax runtime file answered on the same day and said he will send the updated syntax file to Bram. No update from Apple yet. I opened a bug in the feedbackassistant and mailed opens...@apple.com

The groovy syntax file was updated 942db23
No response from apple yet.

Reply all
Reply to author
Forward
0 new messages