From 34b9b5156ac4168b8aab4eae62c0cede89d58b57 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 29 May 2012 07:43:09 -0700 Subject: [PATCH] vim: allow sign of exponent to be optional (e.g., "1e10" should be highlighted correctly). --- misc/vim/syntax/factor.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/vim/syntax/factor.vim b/misc/vim/syntax/factor.vim index 0f9e396ac9..a6b2007020 100644 --- a/misc/vim/syntax/factor.vim +++ b/misc/vim/syntax/factor.vim @@ -68,8 +68,8 @@ syn keyword factorKeyword with-return restarts return-continuation with-datastac syn cluster factorReal contains=factorInt,factorFloat,factorPosRatio,factorNegRatio,factorBinary,factorHex,factorOctal syn cluster factorNumber contains=@factorReal,factorComplex syn cluster factorNumErr contains=factorBinErr,factorHexErr,factorOctErr -syn match factorInt /\<-\=[0-9]\([0-9,]*[0-9]\)\?\([eE][+-][0-9]\+\)\?\>/ -syn match factorFloat /\<-\=[0-9]\([0-9,]*[0-9]\)\?\(\.\([0-9,]*[0-9]\+\([eE][+-][0-9]\+\)\?\)\?\)\?\>/ +syn match factorInt /\<-\=[0-9]\([0-9,]*[0-9]\)\?\([eE]\([+-]\)\?[0-9]\+\)\?\>/ +syn match factorFloat /\<-\=[0-9]\([0-9,]*[0-9]\)\?\(\.\(\([0-9,]*[0-9]\+\)\?\([eE]\([+-]\)\?[0-9]\+\)\?\)\?\)\?\>/ syn match factorPosRatio /\<+\=[0-9]\([0-9,]*[0-9]\)\?\(+[0-9]\([0-9,]*[0-9]\+\)\?\)\?\/-\=[0-9]\([0-9,]*[0-9]\+\)\?\.\?\>/ syn match factorNegRatio /\<\-[0-9]\([0-9,]*[0-9]\)\?\(\-[0-9]\([0-9,]*[0-9]\+\)\?\)\?\/-\=[0-9]\([0-9,]*[0-9]\+\)\?\.\?\>/ syn region factorComplex start=/\/ end=/\<}\>/ contains=@factorReal