Is there an option to automatically close brackets,quotes, parentheses etc in IPython?
I hoped there was a feature similar to that in the gedit plugin.
Is there an option to automatically close brackets,quotes, parentheses etc in IPython?
I hoped there was a feature similar to that in the gedit plugin.
if codemirror support it then it is probably possible by monkey-patch. Configurability is on it's way but long way to go. Patches welcomed.
It is possible to get apps (including IPython) that use readline to automatically add a closing parenthesis when an open parenthesis is typed by tweaking your ~/.inputrc, as suggested here, e.g. by adding: "(": "\C-v()\e[D"
Note that according to the creator of IPython automatic bracket matching can't be done in a plain readline-based application (i.e in a normal IPython terminal session). Though it's already part of the standard functionality of IPython's qtconsole (Although as commented below auto-closing of brackets is not currently possible).