好用的插件
- 安装插件
- 代码自动补全
- 变量查看高亮
- 代码折叠
- 显示行号
- 执行时间
- 多行打印
- 规范化代码
- 模块快速获取
- jupyter notebook中安装包
- 快捷键
安装插件
1.pip直接安装
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
2.方法1不成功就用anoconda安装

打开Anaconda Prompt 输入安装命令
conda install -c conda-forge jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_contrib_nbextensions
安装成功后打开jupyter,页面会多出插件窗口。


如果conda安装过但是失败了,就卸载了再装:
conda remove jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextensions_configurator enable --user
代码自动补全
Hinterland 代码自动补全:自动补全代码。

变量查看高亮
选中Nbextensions,勾选Highlight selected word。

代码折叠
Codefolding in Editor: 增加折叠代码的功能


还可以按标题折叠:Collapsible headings
显示行号
菜单栏View------Toggle Line Numbers

也可以用插件:Toggle all line numbers显示代码行号。
执行时间
Execute time 显示执行时间

多行打印
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

规范化代码
PEP8规范优化代码:Code prettify
按照PEP8 Python编码规范:链接: 《PEP 8 – Style Guide for Python Code》美化代码,依赖Google开发的YAPF模块。


模块快速获取
Document快速获取:Snippets menu
快速添加python、常见模块的example、document等等。

jupyter notebook中安装包
jupyter notebook中安装包,在安装命令前面加“ !”。
! pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pygtrans
快捷键

参考链接:https://zhuanlan.zhihu.com/p/346703253











![[LsSDK][tool] ls_syscfg_gui2.1 and ls_syscfg_debug1.0](https://img-blog.csdnimg.cn/100e4e4b6b884fe69128a0f85af1ab2a.gif#pic_center)







