From b6aafcb269925ae0780d4567c8f9e1457145e822 2014-08-29 02:00:39 From: Brian E. Granger Date: 2014-08-29 02:00:39 Subject: [PATCH] Adding partial latex completions. --- diff --git a/IPython/core/completer.py b/IPython/core/completer.py index c07e65a..8a1ee6b 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -973,7 +973,14 @@ class IPCompleter(Completer): if slashpos > -1: s = text[slashpos:] if s in latex_symbols: + # Try to complete a full latex symbol to unicode + # \\alpha -> α return s, [latex_symbols[s]] + else: + # If a user has partially typed a latex symbol, give them + # a full list of options \al -> [\aleph, \alpha] + matches = [k for k in latex_symbols if k.startswith(s)] + return s, matches return u'', [] def dispatch_custom_completer(self, text):