Jupyter Notebook Autocompletion & Code Formatting

1. Install the extension

  • nbextensions

  1. Install: pip install jupyter_contrib_nbextensions -i https://pypi.mirrors.ustc.edu.cn/simple
  2. Activation: jupyter contrib nbextension install --user
  • nbextensions_configurator

  1. Install: pip install jupyter_nbextensions_configurator
  2. Activation: jupyter nbextensions_configurator enable --user

2. Configure Jupyter notebook

Click on the newly added Nbextensions item.

Uncheck the options shown in the image below:

Check Hinterland (code hinting/autocompletion) and Autopep8 (code formatting):

Code hints and auto-completion have been set up, and you can click the little hammer in the toolbar to format the code:


Jupyter Notebook Autocompletion & Code Formatting
https://www.hardyhu.cn/2022/03/25/Jupyter-Notebook-Autocompletion-Code-Formatting/
Author
John Doe
Posted on
March 25, 2022
Licensed under