You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Numbers with a trailing dot (eg. 1.) should be highlighted as floats, not as ints #41
diff --git a/syntax/python.vim b/syntax/python.vim
index 913da9d..72d13c4 100644
--- a/syntax/python.vim
+++ b/syntax/python.vim
@@ -326,7 +326,7 @@ else
syn match pythonFloat '\.\d\%([_0-9]*\d\)\=\%([eE][+-]\=\d\%([_0-9]*\d\)\=\)\=[jJ]\=\>' display
syn match pythonFloat '\<\d\%([_0-9]*\d\)\=[eE][+-]\=\d\%([_0-9]*\d\)\=[jJ]\=\>' display
- syn match pythonFloat '\<\d\%([_0-9]*\d\)\=\.\d\%([_0-9]*\d\)\=\%([eE][+-]\=\d\%([_0-9]*\d\)\=\)\=[jJ]\=' display
+ syn match pythonFloat '\<\d\%([_0-9]*\d\)\=\.\d\=\%([_0-9]*\d\)\=\%([eE][+-]\=\d\%([_0-9]*\d\)\=\)\=[jJ]\=' display
endif
"
(i.e. adding a = after the \d after the decimal dot) fixes the issue.
Activity
anntzer commentedon Mar 29, 2018
I think just
(i.e. adding a = after the \d after the decimal dot) fixes the issue.
nfnty commentedon Jul 7, 2018
Open a PR and I'll merge it.
anntzer commentedon Jul 7, 2018
Please apply the patch above.
nfnty commentedon Jan 9, 2019
Thanks!