1
0
forked from VimPlug/jedi

Indent code blocks in the docstring

This commit is contained in:
Aaron Meurer
2013-08-10 00:50:26 -06:00
parent 7c53988bae
commit 8b3a62a76f

View File

@@ -16,21 +16,21 @@ def setup_readline():
shell. If you want to use a custom ``PYTHONSTARTUP`` file (typically shell. If you want to use a custom ``PYTHONSTARTUP`` file (typically
``$HOME/.pythonrc.py``), you can add this piece of code:: ``$HOME/.pythonrc.py``), you can add this piece of code::
try: try:
from jedi.utils import setup_readline from jedi.utils import setup_readline
setup_readline() setup_readline()
except ImportError: except ImportError:
print('Install Jedi! No autocompletion otherwise.') print('Install Jedi! No autocompletion otherwise.')
Alternately, you can fall back to regular readline completion with Alternately, you can fall back to regular readline completion with
something like:: something like::
try: try:
from jedi.utils import setup_readline from jedi.utils import setup_readline
setup_readline() setup_readline()
except ImportError: except ImportError:
import readline, rlcompleter import readline, rlcompleter
readline.parse_and_bind("tab: complete") readline.parse_and_bind("tab: complete")
You'll also need to add ``export PYTHONSTARTUP=$HOME/.pythonrc.py`` to You'll also need to add ``export PYTHONSTARTUP=$HOME/.pythonrc.py`` to
your bash profile (usually ``.bash_profile`` or ``.profile``). your bash profile (usually ``.bash_profile`` or ``.profile``).