Show More
@@ -12,24 +12,24 b' The following codes in the prompt string will be substituted into the' | |||||
12 | prompt string: |
|
12 | prompt string: | |
13 |
|
13 | |||
14 | ====== =================================== ===================================================== |
|
14 | ====== =================================== ===================================================== | |
15 |
Short |
|
15 | Short Long Notes | |
16 | ====== =================================== ===================================================== |
|
16 | ====== =================================== ===================================================== | |
17 |
%n,\\# |
|
17 | %n,\\# {color.number}{count}{color.prompt} history counter with bolding | |
18 |
\\N |
|
18 | \\N {count} history counter without bolding | |
19 |
\\D |
|
19 | \\D {dots} series of dots the same width as the history counter | |
20 |
\\T |
|
20 | \\T {time} current time | |
21 |
\\w |
|
21 | \\w {cwd} current working directory | |
22 |
\\W |
|
22 | \\W {cwd_last} basename of CWD | |
23 |
\\Xn |
|
23 | \\Xn {cwd_x[n]} Show the last n terms of the CWD. n=0 means show all. | |
24 |
\\Yn |
|
24 | \\Yn {cwd_y[n]} Like \Xn, but show '~' for $HOME | |
25 |
\\h |
|
25 | \\h hostname, up to the first '.' | |
26 | \\H full hostname |
|
26 | \\H full hostname | |
27 |
\\u |
|
27 | \\u username (from the $USER environment variable) | |
28 |
\\v |
|
28 | \\v IPython version | |
29 |
\\$ |
|
29 | \\$ root symbol ("$" for normal user or "#" for root) | |
30 |
``\\`` |
|
30 | ``\\`` escaped '\\' | |
31 |
\\n |
|
31 | \\n newline | |
32 |
\\r |
|
32 | \\r carriage return | |
33 | n/a {color.<Name>} set terminal colour - see below for list of names |
|
33 | n/a {color.<Name>} set terminal colour - see below for list of names | |
34 | ====== =================================== ===================================================== |
|
34 | ====== =================================== ===================================================== | |
35 |
|
35 | |||
@@ -158,7 +158,9 b' new requests are handled by the original process. This means that almost no' | |||||
158 | time is spent in handling the request (assuming an Emacs process is already |
|
158 | time is spent in handling the request (assuming an Emacs process is already | |
159 | running). For this to work, you need to set your EDITOR environment variable |
|
159 | running). For this to work, you need to set your EDITOR environment variable | |
160 | to 'emacsclient'. The code below, supplied by Francois Pinard, can then be |
|
160 | to 'emacsclient'. The code below, supplied by Francois Pinard, can then be | |
161 |
used in your :file:`.emacs` file to enable the server: |
|
161 | used in your :file:`.emacs` file to enable the server: | |
|
162 | ||||
|
163 | .. code-block:: common-lisp | |||
162 |
|
164 | |||
163 | (defvar server-buffer-clients) |
|
165 | (defvar server-buffer-clients) | |
164 | (when (and (fboundp 'server-start) (string-equal (getenv "TERM") 'xterm)) |
|
166 | (when (and (fboundp 'server-start) (string-equal (getenv "TERM") 'xterm)) | |
@@ -181,7 +183,9 b' currently (X)Emacs and IPython get along very well in other ways.' | |||||
181 |
|
183 | |||
182 | The file :file:`ipython.el` is included with the IPython distribution, in the |
|
184 | The file :file:`ipython.el` is included with the IPython distribution, in the | |
183 | directory :file:`docs/emacs`. Once you put these files in your Emacs path, all |
|
185 | directory :file:`docs/emacs`. Once you put these files in your Emacs path, all | |
184 |
you need in your :file:`.emacs` file is: |
|
186 | you need in your :file:`.emacs` file is: | |
|
187 | ||||
|
188 | .. code-block:: common-lisp | |||
185 |
|
189 | |||
186 | (require 'ipython) |
|
190 | (require 'ipython) | |
187 |
|
|
191 | ||
@@ -190,12 +194,16 b' IPython, opening IPython as your Python shell via ``C-c !``, etc.' | |||||
190 |
|
194 | |||
191 | You can customize the arguments passed to the IPython instance at startup by |
|
195 | You can customize the arguments passed to the IPython instance at startup by | |
192 | setting the ``py-python-command-args`` variable. For example, to start always |
|
196 | setting the ``py-python-command-args`` variable. For example, to start always | |
193 |
with ``matplotlib`` integration and hardcoded light-background colors, you can use: |
|
197 | with ``matplotlib`` integration and hardcoded light-background colors, you can use: | |
|
198 | ||||
|
199 | .. code-block:: common-lisp | |||
194 |
|
200 | |||
195 | (setq py-python-command-args '("--matplotlib" "--colors" "LightBG")) |
|
201 | (setq py-python-command-args '("--matplotlib" "--colors" "LightBG")) | |
196 |
|
|
202 | ||
197 | If you happen to get garbage instead of colored prompts as described in |
|
203 | If you happen to get garbage instead of colored prompts as described in | |
198 |
the previous section, you may need to set also in your :file:`.emacs` file: |
|
204 | the previous section, you may need to set also in your :file:`.emacs` file: | |
|
205 | ||||
|
206 | .. code-block:: common-lisp | |||
199 |
|
207 | |||
200 | (setq ansi-color-for-comint-mode t) |
|
208 | (setq ansi-color-for-comint-mode t) | |
201 |
|
|
209 |
General Comments 0
You need to be logged in to leave comments.
Login now