Porous polymers with robust organic structures through a covalent backbone feature permanent voids that can be used for chemical activities. We have developed a family of nanoporous (pore size < 100 nm) covalent organic polymers (COPs), which show significant capacities and selectivities for carbon dioxide. Surprisingly, azo (N=N) bearing COPs show lack of N2-philicity by increasing temperature, in other words N2-phobicity, leading to very high CO2/N2 selectivities. Under high pressures COP-1 shows a record high capacity of 5.6 g/g CO2 uptake at 200 bar and 45 oC. COP-83 has a capacity of 5 mmol/g at 298 K and 1 bar, and COP-97 shows an uptake of 8 % (w/w) CO2 in 2 minutes from a simulated flue gas mixture (CO2 15%, H2O 3.8%, He 81.2%, 40 C, flow rate: 80 mL/min). More recently we established the first direct introduction of ethylene diamines on the walls of COPs through bromination intermediates. CO2 uptake capacities multiply with the nitrogen content, up to an unprecedented four times of the starting porous polymer in dry flue gas conditions. Morphology control is another subject of interest and we made hollow spheres of COP-122 with nitrile pendant groups for further grafting chemistry. Our results point to a great potential in porous polymers for chemical conversions in their confined spaces since they are highly porous, inexpensive, physisorptive solids, which can be chemically modified with chemisorptive functionalities.