Replace match with keyword when possible to speed highlighting up