In situ fabrication of a temperature and pH dual-responsive linear supramolecular polymer through the marriage of dynamic covalent bonding and pillar[5]arene-based host-guest interaction was investigated.