print("\t") # I copy pasted the output of the cell above here ip = get_ipython() ip.set_next_input("\tMakefiles are awesome") Makefiles are awesome %load /home/pi/file_with_tabs default: cat /etc/issue whoami %%writefile ~/file_with_tabs default: cat /etc/issue whoami !make -f /home/pi/file_with_tabs %%javascript IPython.tab_as_tab_everywhere = function(use_tabs) { if (use_tabs === undefined) { use_tabs = true; } // apply setting to all current CodeMirror instances IPython.notebook.get_cells().map( function(c) { return c.code_mirror.options.indentWithTabs=use_tabs; } ); // make sure new CodeMirror instances created in the future also use this setting CodeMirror.defaults.indentWithTabs=use_tabs; };