[vim/vim] Tweak vb.vim; change maintainership (PR #9233)

11 views
Skip to first unread message

Tim Chase

unread,
Nov 27, 2021, 9:42:44 AM11/27/21
to vim/vim, Subscribed

A series of small changes from Doug Kearns

  • Allow "@" as a currency-type suffix

  • More accurately describe a valid Type Specifier

  • Line numbers can include a colon

  • Add line-labels

  • Add highlighting for conditional directives

  • Update changelog with credit to Doug

  • Designate Doug Kearns the new maintainer for vb.vim

  • Normalize tabs-vs-spaces in vb.vim to all spaces for alignment (previously, this was a hodge-podge of spaces and tabs)


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

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

Commit Summary

  • e9efb28 Allow "@" as a currency-type suffix
  • f9ebc43 More accurately describe a valid Type Specifier
  • 76aa628 Line numbers can include a colon
  • 17901c2 Add line-labels
  • f852685 Add highlighting for conditional directives
  • 4d09856 Update changelog with credit to Doug
  • fac70b8 Designate Doug Kearns the new maintainer for vb.vim
  • 0e61b75 Normalize tabs-vs-spaces in vb.vim to all spaces for alignment

File Changes

(1 file)

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Bram Moolenaar

unread,
Nov 27, 2021, 1:23:15 PM11/27/21
to vim/vim, Subscribed

I'm assuming that Doug already reviewed this. I'll include it, thanks.

Bram Moolenaar

unread,
Nov 27, 2021, 1:23:17 PM11/27/21
to vim/vim, Subscribed

Closed #9233.

Doug Kearns

unread,
Nov 27, 2021, 9:33:11 PM11/27/21
to vim/vim, Subscribed

I did and thanks to Tim for keeping the dream alive all these years.

Dominique Pellé

unread,
Nov 28, 2021, 3:51:37 AM11/28/21
to vim/vim, Subscribed

@dpelle commented on this pull request.


In runtime/syntax/vb.vim:

>  
 " String and Character contstants
 syn region  vbString		start=+"+  end=+"\|$+
 syn region  vbComment		start="\(^\|\s\)REM\s" end="$" contains=vbTodo
 syn region  vbComment		start="\(^\|\s\)\'"   end="$" contains=vbTodo
-syn match   vbLineNumber	"^\d\+\(\s\|$\)"
-syn match   vbTypeSpecifier  "[a-zA-Z0-9][\$%&!#]"ms=s+1
+syn match   vbLineLabel		"^\h\w\+:"
+syn match   vbLineNumber	"^\d\+\(:\|\s\|$\)"
+syn match   vbTypeSpecifier  "\<\a\w*[@\$%&!#]"ms=s+1
 syn match   vbTypeSpecifier  "#[a-zA-Z0-9]"me=e-1

(nitpicky) according to the note below :help regex \x, using \x should be faster than [a-zA-Z0-9], at least with the old regexp engine (set re=1) as I think the new one automatically replaces [a-zA-Z0-9] with \x.

Tim Chase

unread,
Nov 29, 2021, 12:13:22 PM11/29/21
to vim/vim, Subscribed

@Gumnos commented on this pull request.


In runtime/syntax/vb.vim:

>  

 " String and Character contstants

 syn region  vbString		start=+"+  end=+"\|$+

 syn region  vbComment		start="\(^\|\s\)REM\s" end="$" contains=vbTodo

 syn region  vbComment		start="\(^\|\s\)\'"   end="$" contains=vbTodo

-syn match   vbLineNumber	"^\d\+\(\s\|$\)"

-syn match   vbTypeSpecifier  "[a-zA-Z0-9][\$%&!#]"ms=s+1

+syn match   vbLineLabel		"^\h\w\+:"

+syn match   vbLineNumber	"^\d\+\(:\|\s\|$\)"

+syn match   vbTypeSpecifier  "\<\a\w*[@\$%&!#]"ms=s+1

 syn match   vbTypeSpecifier  "#[a-zA-Z0-9]"me=e-1

@dpelle, the \x only handles hex characters A–F (plus digits), not the full range of the alphabet (plus digits), so it wouldn't find the appropriate characters in this case.

Christ van Willegen

unread,
Nov 29, 2021, 2:41:04 PM11/29/21
to vim...@googlegroups.com, reply+ACY5DGBXYVPCPIXW54...@reply.github.com, vim/vim, Subscribed


Op ma 29 nov. 2021 18:13 schreef Tim Chase <vim-dev...@256bit.org>:

@Gumnos commented on this pull request.


In runtime/syntax/vb.vim:

>  

 " String and Character contstants

Constants

Christ van Willegen

vim-dev ML

unread,
Nov 29, 2021, 2:41:20 PM11/29/21
to vim/vim, vim-dev ML, Your activity

Op ma 29 nov. 2021 18:13 schreef Tim Chase ***@***.***>:

> ***@***.**** commented on this pull request.
> ------------------------------
>
> In runtime/syntax/vb.vim
> <https://github.com/vim/vim/pull/9233#discussion_r758570913>:

>
> >
>
> " String and Character contstants
>
>
Constants

Christ van Willegen

>
Reply all
Reply to author
Forward
0 new messages