def load_emacs_open_in_editor_bindings():
 registry = Registry()
 registry.add_binding(Keys.ControlX, Keys.ControlE, filter=(EmacsMode() & (~ HasSelection())))(get_by_name(u'edit-and-execute-command'))
 return registry

def load_emacs_open_in_editor_bindings ( ) : registry = Registry ( ) registry . add_binding ( Keys . ControlX , Keys . ControlE , filter = ( EmacsMode ( ) & ( ~ HasSelection ( ) ) ) ) ( get_by_name ( u'edit-and-execute-command' ) ) return registry
pressing c-x c-e will open the buffer in an external editor .