Hi, I'm trying to customize my notebooks' python cells indent size to 2 spaces.
This is on a jupyter install where I am not an admin user, I just have access to my own unix home dir.
In a single user, ipython setup, I used to do that by adding some code in custom.js in my profile dir.
I'm a bit lost with respect to what are the directories that jupyter actually searches, and I was not able to get custom.js to be loaded.
define(function(){
return {
load_ipython_extension: function(){
console.log('Loading ugos custom.js');
require(["notebook/js/codecell"], function(result) {
result.CodeCell.options_default.cm_config.indentUnit = 2;
console.log('Loaded ugos custom.js');
});
}
};
});
If I explicitly run a cell:
%%javascript
require(['base/js/utils'], function(utils) { utils.load_extensions('ugo'); });
in my notebook, then new cells do have 2 spaces indents.
But now I don't know how to get ipython to load the extension automatically, so that all the cells do get the same indentUnit.
Can you help me with this?
Thank you!
Ugo