This documentation covers a development version of IPython. The development version may differ significantly from the latest stable release.
This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than 3.3 including all versions of Python 2.7.
If you are looking for an IPython version compatible with Python 2.7, please use the IPython 5.x LTS release and refer to its documentation (LTS is the long term support release).
- class IPython.terminal.shortcuts.auto_suggest.AppendAutoSuggestionInAnyLine(style: str = 'class:auto-suggestion')¶
Append the auto suggestion to lines other than the last (appending to the last line is natively supported by the prompt toolkit).
A subclass of AutoSuggestFromHistory that allow navigation to next/previous suggestion from history. To do so it remembers the current position, but it state need to carefully be cleared on the right events.
We receive both
Document. The reason is that auto suggestions are retrieved asynchronously. (Like completions.) The buffer text could be changed in the meantime, but
documentcontains the buffer document like it was at the start of the auto suggestion call. So, from here, don’t access
buffer.text, but use
- IPython.terminal.shortcuts.auto_suggest.accept_or_jump_to_end(event: KeyPressEvent)¶
Apply autosuggestion or jump to end of line.
- IPython.terminal.shortcuts.auto_suggest.accept_word(event: KeyPressEvent)¶
Fill partial autosuggestion by word
- IPython.terminal.shortcuts.auto_suggest.accept_character(event: KeyPressEvent)¶
Fill partial autosuggestion by character
- IPython.terminal.shortcuts.auto_suggest.accept_and_keep_cursor(event: KeyPressEvent)¶
Accept autosuggestion and keep cursor in place
- IPython.terminal.shortcuts.auto_suggest.accept_and_move_cursor_left(event: KeyPressEvent)¶
Accept autosuggestion and move cursor left in place
- IPython.terminal.shortcuts.auto_suggest.backspace_and_resume_hint(event: KeyPressEvent)¶
Resume autosuggestions after deleting last character
- IPython.terminal.shortcuts.auto_suggest.resume_hinting(event: KeyPressEvent)¶
- IPython.terminal.shortcuts.auto_suggest.up_and_update_hint(event: KeyPressEvent)¶
Go up and update hint
- IPython.terminal.shortcuts.auto_suggest.down_and_update_hint(event: KeyPressEvent)¶
Go down and update hint
- IPython.terminal.shortcuts.auto_suggest.accept_token(event: KeyPressEvent)¶
Fill partial autosuggestion by token
- IPython.terminal.shortcuts.auto_suggest.swap_autosuggestion_up(event: KeyPressEvent)¶
Get next autosuggestion from history.