A quinoline-vinyl-dihydroxylphenyl linkage comprising a donor-π-bridge-acceptor structural motif, in which the quinoline serves as an electron-withdrawing core, has been synthesized and used as a fluorescent sensor (2) for the recognition of Al³⁺+ and F⁻ by colorimetry/fluorescence. The sensor 2 exhibited little fluorescence due to excited-state intramolecular proton transfer from the hydroxyl oxygens to the nitrogen of the quinoline moiety. By contrast, on coordination of Al³⁺+ or F⁻, sensor 2 afforded strong fluorescence. A reversible “off–on” optical switching mode has been constructed by sequential inputs from Al³⁺+ and F⁻ ions to the sensor 2 via different excitation and emission wavelengths. ¹H NMR and IR spectroscopic analysis revealed that the Al³⁺+ is coordinated to the quinoline nitrogen and phenolic oxygen atoms, whereas the F⁻ center is only coordinated by two phenolic oxygen atoms.