In jypyter notebook, I didn't set it specifically, but the indentation width is 2.
I'd like to change the indentation to 4 spaces, what should I do?
According to the official document, you can change the indentation width by executing the following code in your browser's Javascript console:
varcell=Jupyter.notebook.get_selected_cell();
varconfig =cell.config;
var patch = {
CodeCell: {
cm_config: {indentUnit:4}
}
}
config.update (patch)
© 2024 OneMinuteCode. All rights reserved.