##// END OF EJS Templates
ipy_leo: %mb magic and relevant completer for leo minibuffer commands
Ville M. Vainio -
Show More
@@ -411,6 +411,25 b' def leoref_f(self,s):'
411 )
411 )
412 ip.expose_magic('leoref',leoref_f)
412 ip.expose_magic('leoref',leoref_f)
413
413
414 from ipy_leo import *
415
416 ip = IPython.ipapi.get()
417
418 def mb_f(self, arg):
419 """ Execute leo minibuffer commands """
420 c.executeMinibufferCommand(arg)
421
422 def mb_completer(self,event):
423 """ Custom completer for minibuffer """
424 cmds = c.commandsDict.keys()
425 cmds.sort()
426 return cmds
427
428 pass
429 ip.set_hook('complete_command', mb_completer, str_key = 'mb')
430 ip.expose_magic('mb',mb_f)
431
432
414 def show_welcome():
433 def show_welcome():
415 print "------------------"
434 print "------------------"
416 print "Welcome to Leo-enabled IPython session!"
435 print "Welcome to Leo-enabled IPython session!"
General Comments 0
You need to be logged in to leave comments. Login now