1
$\begingroup$

Every time I type something into a notebook, I am compelled to first change the cell type from Input to Code, and then unset the menu option in Cell > Cell Properties > Initialization Cell.

What global notebook option must I edit to have a non-initialised Code cell created by default when I enter text into a notebook? The following link did not help me very much:

How do I change the default format type of new cells?

Thanks in advance.

Edit 1

I have tried changing the option in Option Inspector, but the change does not get saved:

enter image description here

Edit 2

I am leaving Edit 1 unaltered, so that Domen's remark has context.

enter image description here

$\endgroup$
8
  • $\begingroup$ What is the reason to change it in the first place? $\endgroup$
    – Lukas Lang
    Jan 16 at 19:05
  • $\begingroup$ It is noted in the first paragraph. I have very little need for the Input cell, since I prefer the formatting of Code. $\endgroup$ Jan 16 at 19:18
  • $\begingroup$ Take a look at DefaultNewCellStyle: mathematica.stackexchange.com/questions/92017/… $\endgroup$
    – Kuba
    Jan 16 at 19:26
  • $\begingroup$ That is the suggestion in the link in my post. I tried changing "Input" to "Code" there, but the option cannot be saved. Clicking Apply does not do anything. $\endgroup$ Jan 16 at 19:41
  • $\begingroup$ No it is not, the option name is different. $\endgroup$
    – Kuba
    Jan 16 at 19:44

1 Answer 1

1
$\begingroup$

Put this in your initialization file:

SetOptions[$FrontEnd, 
    DefaultNewCellStyle -> "Code",  
    InitializationCellEvaluation -> False]

(but see note about InitializationCellEvaluation).

This is slightly different from what you are asking if you want to mark just some cells for initialization (the above solution turns it off globally). Unfortunately, I don't know how to avoid that.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.