##// END OF EJS Templates
Update docstrings for magic_edit (both the terminal version and the GUI version)
Thomas Kluyver -
Show More
@@ -2263,10 +2263,10 b' Currently the magic system has the following functions:\\n"""'
2263 %edit [options] [args]
2263 %edit [options] [args]
2264
2264
2265 %edit runs IPython's editor hook. The default version of this hook is
2265 %edit runs IPython's editor hook. The default version of this hook is
2266 set to call the __IPYTHON__.rc.editor command. This is read from your
2266 set to call the editor specified by your $EDITOR environment variable.
2267 environment variable $EDITOR. If this isn't found, it will default to
2267 If this isn't found, it will default to vi under Linux/Unix and to
2268 vi under Linux/Unix and to notepad under Windows. See the end of this
2268 notepad under Windows. See the end of this docstring for how to change
2269 docstring for how to change the editor hook.
2269 the editor hook.
2270
2270
2271 You can also set the value of this editor via the
2271 You can also set the value of this editor via the
2272 ``TerminalInteractiveShell.editor`` option in your configuration file.
2272 ``TerminalInteractiveShell.editor`` option in your configuration file.
@@ -2327,7 +2327,7 b' Currently the magic system has the following functions:\\n"""'
2327 to load an editor exactly at the point where 'function' is defined,
2327 to load an editor exactly at the point where 'function' is defined,
2328 edit it and have the file be executed automatically.
2328 edit it and have the file be executed automatically.
2329
2329
2330 If the object is a macro (see %macro for details), this opens up your
2330 - If the object is a macro (see %macro for details), this opens up your
2331 specified editor with a temporary file containing the macro's data.
2331 specified editor with a temporary file containing the macro's data.
2332 Upon exit, the macro is reloaded with the contents of the file.
2332 Upon exit, the macro is reloaded with the contents of the file.
2333
2333
@@ -235,17 +235,9 b' class ZMQInteractiveShell(InteractiveShell):'
235 Usage:
235 Usage:
236 %edit [options] [args]
236 %edit [options] [args]
237
237
238 %edit runs IPython's editor hook. The default version of this hook is
238 %edit runs an external text editor. You will need to set the command for
239 set to call the __IPYTHON__.rc.dditor command. This is read from your
239 this editor via the ``TerminalInteractiveShell.editor`` option in your
240 environment variable $EDITOR. If this isn't found, it will default to
240 configuration file before it will work.
241 vi under Linux/Unix and to notepad under Windows. See the end of this
242 docstring for how to change the editor hook.
243
244 You can also set the value of this editor via the
245 ``TerminalInteractiveShell.editor`` option in your configuration file.
246 This is useful if you wish to use a different editor from your typical
247 default with IPython (and for Windows users who typically don't set
248 environment variables).
249
241
250 This command allows you to conveniently edit multi-line code right in
242 This command allows you to conveniently edit multi-line code right in
251 your IPython session.
243 your IPython session.
@@ -364,16 +356,7 b' class ZMQInteractiveShell(InteractiveShell):'
364 Editing... done. Executing edited code...
356 Editing... done. Executing edited code...
365 hello again
357 hello again
366 Out[7]: "print 'hello again'n"
358 Out[7]: "print 'hello again'n"
367
359 """
368
369 Changing the default editor hook:
370
371 If you wish to write your own editor hook, you can put it in a
372 configuration file which you load at startup time. The default hook
373 is defined in the IPython.core.hooks module, and you can use that as a
374 starting example for further modifications. That file also has
375 general instructions on how to set a new hook for use once you've
376 defined it."""
377
360
378 opts,args = self.parse_options(parameter_s,'prn:')
361 opts,args = self.parse_options(parameter_s,'prn:')
379
362
General Comments 0
You need to be logged in to leave comments. Login now