Update docs to refer to .config/utop/init.ml

This commit is contained in:
Fabian 2020-02-22 21:53:20 +01:00 committed by ZAN DoYe
parent 53813ef663
commit 712678f959
4 changed files with 14 additions and 10 deletions

View File

@ -86,12 +86,12 @@ You can customize the prompt of utop by setting the reference
`UTop.prompt`. `UTop.prompt`.
To turn off all colors and remove the line above the prompt To turn off all colors and remove the line above the prompt
that lists time, etc., add this to your .ocamlinit file: that lists time, etc., add this to ~/.config/utop/init.ml:
```OCaml ```OCaml
#utop_prompt_dummy;; #utop_prompt_dummy;;
``` ```
To turn off the line of boxes listing possible completions that appears under To turn off the line of boxes listing possible completions that appears under
the prompt, add this to .ocamlinit: the prompt, add this to ~/.config/utop/init.ml:
```OCaml ```OCaml
UTop.set_show_box false UTop.set_show_box false
``` ```

View File

@ -58,10 +58,10 @@ utop. For that type:
UTop.set_profile UTop.Light;; UTop.set_profile UTop.Light;;
You can then add this line to your You can then add this line to your
.I ~/.ocamlinit .I ~/.config/utop/init.ml
file. file.
To turn off utop's advanced prompt features, add the following to .ocamlinit To turn off utop's advanced prompt features, add the following to init.ml
to turn off respectively (a) colors and the upper information line, and to turn off respectively (a) colors and the upper information line, and
(b) the lower boxed list of possible completions: (b) the lower boxed list of possible completions:
@ -95,10 +95,14 @@ Same as
.BR ocaml (1). .BR ocaml (1).
.SH FILES .SH FILES
.I ~/.ocamlinit .I ~/.config/utop/init.ml
.RS .RS
The initialization file of the toplevel. The initialization file of the toplevel.
.RE .RE
.I ~/.ocamlinit
.RS
The alternative initialization file of the toplevel.
.RE
.I ~/.utoprc .I ~/.utoprc
.RS .RS
The configuration file for utop. See The configuration file for utop. See

View File

@ -51,7 +51,7 @@ or
This is the same as calling This is the same as calling
.I UTop.set_profile .I UTop.set_profile
in in
.I ~/.ocamlinit. .I ~/.config/utop/init.ml.
The following style keys are used by utop: The following style keys are used by utop:

View File

@ -157,7 +157,7 @@ val set_auto_run_async : bool -> unit
val end_and_accept_current_phrase : LTerm_read_line.action val end_and_accept_current_phrase : LTerm_read_line.action
(** Action that add the phrase terminator at the end of the current phrase (** Action that add the phrase terminator at the end of the current phrase
and accepts it. For instance to avoid typing [;;], add this to your and accepts it. For instance to avoid typing [;;], add this to your
~/.ocamlinit: ~/.config/utop/init.ml:
{[ {[
#require "lambda-term";; #require "lambda-term";;
@ -179,7 +179,7 @@ val history : LTerm_history.t
[LTerm_history] module. [LTerm_history] module.
For example if you want to limit the history to 1000 line, add For example if you want to limit the history to 1000 line, add
these lines to your ~/.ocamlinit file: these lines to your ~/.config/utop/init.ml file:
{[ {[
#require "lambda-term";; #require "lambda-term";;