remove spaces from delimiters when using &commentstring

This commit is contained in:
Martin Grenfell
2009-03-17 13:31:48 +13:00
parent b32d2cfad2
commit 7052ba60f4

View File

@@ -723,8 +723,8 @@ function s:SetUpForNewFiletype(filetype, forceReset)
else
"extract the delims from &commentstring
let left= substitute(&commentstring, '\(.*\)%s.*', '\1', '')
let right= substitute(&commentstring, '.*%s\(.*\)', '\1', 'g')
let left= substitute(&commentstring, '\([^ \t]*\)\s*%s.*', '\1', '')
let right= substitute(&commentstring, '.*%s\s*\(.*\)', '\1', 'g')
call s:MapDelimiters(left,right)
endif