diff options
Diffstat (limited to 'evil-ex.el')
| -rw-r--r-- | evil-ex.el | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -222,6 +222,24 @@ Otherwise behaves like `delete-backward-char'." (unless (minibufferp) (abort-recursive-edit))) +(defun evil-ex-command-window () + "Start command window with ex history and current minibuffer content." + (interactive) + (let ((current (minibuffer-contents)) + (config (current-window-configuration))) + (evil-ex-teardown) + (select-window (minibuffer-selected-window) t) + (evil-command-window (cons current evil-ex-history) + ":" + (apply-partially 'evil-ex-command-window-execute config)))) + +(defun evil-ex-command-window-execute (config result) + (select-window (active-minibuffer-window) t) + (set-window-configuration config) + (delete-minibuffer-contents) + (insert result) + (exit-minibuffer)) + (defun evil-ex-setup () "Initialize Ex minibuffer. This function registers several hooks that are used for the |
