Jupyter Highlight Selected Word
Jupyter Highlight Selected Word is a Jupyter notebook extension that highlights all instances of the currently-selected or cursor-adjacent word within the notebook. It enhances code readability and navigation by visually emphasizing matching terms across cells or within the current cell. The latest version is 0.2.0, released in 2018, indicating a very slow or halted release cadence and potentially limited compatibility with newer Jupyter and Python environments.
Warnings
- breaking The `jupyter_highlight_selected_word` extension is known to be incompatible with Jupyter Notebook 7 and newer versions of JupyterLab. Users upgrading their Jupyter environment may find this extension no longer functions.
- breaking There are reports of incompatibility with Python 3.11 and potentially newer Python versions, which might prevent the extension from installing or functioning correctly.
- deprecated The project's last PyPI release was in April 2018, indicating a lack of active development and maintenance. This means it may not receive updates for compatibility with new Jupyter or Python releases, security fixes, or new features.
- gotcha When installed via `pip`, the JavaScript and CSS assets for the nbextension must also be explicitly installed and enabled using `jupyter nbextension install` and `jupyter nbextension enable` commands. Installation via `conda` from `conda-forge` is noted to handle these steps automatically.
- gotcha Some users have reported issues with highlighting getting 'stuck' or erratic selection behavior in Jupyter Notebook cells, particularly when using the VS Code Jupyter extension.
Install
-
pip install jupyter_highlight_selected_word -
conda install -c conda-forge jupyter_highlight_selected_word
Imports
- nbextension_enablement
jupyter nbextension install --py jupyter_highlight_selected_word --user jupyter nbextension enable jupyter_highlight_selected_word/main
Quickstart
# Install the Python package pip install jupyter_highlight_selected_word # Install the nbextension's JavaScript and CSS files jupyter nbextension install --py jupyter_highlight_selected_word --user # Enable the extension so it loads in your notebooks jupyter nbextension enable jupyter_highlight_selected_word/main # To verify installation (optional, might require jupyter_nbextensions_configurator) # jupyter nbextension list # Look for 'jupyter_highlight_selected_word/main - enabled'