Skip to content

Do support underscore in numbers, pep515 (py3.6) #725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions syntax/python.vim
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,16 @@ endif
" Numbers {{{
" ===========

syn match pythonHexError "\<0[xX]\x*[g-zG-Z]\x*[lL]\=\>" display
syn match pythonHexNumber "\<0[xX]\x\+[lL]\=\>" display
syn match pythonOctNumber "\<0[oO]\o\+[lL]\=\>" display
syn match pythonBinNumber "\<0[bB][01]\+[lL]\=\>" display
syn match pythonNumber "\<\d\+[lLjJ]\=\>" display
syn match pythonFloat "\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display
syn match pythonFloat "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
syn match pythonFloat "\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
syn match pythonOctError "\<0[oO]\=\o*[8-9]\d*[lL]\=\>" display
syn match pythonBinError "\<0[bB][01]*[2-9]\d*[lL]\=\>" display
syn match pythonHexError "\<0[xX][0-9a-fA-F_]*[g-zG-Z][0-9a-fA-F_]*[lL]\=\>" display
syn match pythonHexNumber "\<0[xX][0-9a-fA-F_]*[0-9a-fA-F][0-9a-fA-F_]*[lL]\=\>" display
syn match pythonOctNumber "\<0[oO][0-7_]*[0-7][0-7_]*[lL]\=\>" display
syn match pythonBinNumber "\<0[bB][01_]*[01][01_]*[lL]\=\>" display
syn match pythonNumber "\<[0-9][0-9_]*[lLjJ]\=\>" display
syn match pythonFloat "\.[0-9_]*[0-9][0-9_]*\([eE][+-]\=[0-9_]*[0-9][0-9_]*\)\=[jJ]\=\>" display
syn match pythonFloat "\<[0-9][0-9_]*[eE][+-]\=[0-9_]\+[jJ]\=\>" display
syn match pythonFloat "\<[0-9][0-9_]*\.[0-9_]*\([eE][+-]\=[0-9_]*[0-9][0-9_]*\)\=[jJ]\=" display
syn match pythonOctError "\<0[oO]\=[0-7_]*[8-9][0-9_]*[lL]\=\>" display
syn match pythonBinError "\<0[bB][01_]*[2-9][0-9_]*[lL]\=\>" display

" }}}

Expand Down