Reputation: 673
When I run IPython inside emacs in textmode (i.e. inside a terminal), I don't get any tab completion. Rather than given tab completion it jumps four spaces.
When I run emacs in normal GUI mode there is fine tab completion.
Is there a way to fix that for text mode?
I'm using Linux Mint 15, Emacs 24.3 and IPython 1.1.0
Upvotes: 5
Views: 2527
Reputation: 1823
I recently encountered the same problem and after some search I found that this problem is caused by the difference between <tab>
and TAB
. The Emacs wiki has a page describes the difference: http://www.emacswiki.org/emacs/TabKey .
In my python.el, the python-shell-completion-complete-or-indent
is bind to <tab>
which works fine for GUI but not for CLI. Change the binding to TAB
will fix this problem.
Upvotes: 1
Reputation: 9400
Try this:
(eval-after-load "python"
'(define-key inferior-python-mode-map "\t" 'python-shell-completion-complete-or-indent)
If this works for you, you may have a misconfiguration problem that is preventing python mode to load correctly in your setup.
Upvotes: 1
Reputation: 4804
Start IPython not from pure shell, but from a python-mode.
I.e. M-x run-python RET with shipped python.el, having customized python-shell-interpreter
accordingly.
Resp. M-x IPython RET with python-mode.el
Upvotes: 0