diff options
| author | Evgeni Kolev <evgenysw@gmail.com> | 2017-05-31 15:44:52 +0300 |
|---|---|---|
| committer | Evgeni Kolev <evgenysw@gmail.com> | 2017-05-31 15:44:52 +0300 |
| commit | 5dc2f713f1a383d12270e8c542b37894695ff0bc (patch) | |
| tree | 939aa8be9e1e170d3be7bba49ed5c4f979f62fe4 /evil-commands.el | |
| parent | 00ab2876f2849c3be9f5d7475e4538a0ffecf872 (diff) | |
Add support for passing REGISTER and COUNT to :yank
Diffstat (limited to 'evil-commands.el')
| -rw-r--r-- | evil-commands.el | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/evil-commands.el b/evil-commands.el index acb23fa..e1c0311 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -1440,7 +1440,7 @@ be joined with the previous line if and only if (evil-define-operator evil-ex-delete (beg end type register count yank-handler) "The Ex delete command. \[BEG,END]delete [REGISTER] [COUNT]" - (interactive "<R><d/><y>") + (interactive "<R><xc/><y>") (when count ;; with COUNT, :delete should go the end of the region and delete ;; COUNT lines from there @@ -1454,6 +1454,23 @@ be joined with the previous line if and only if type 'line)) (evil-delete beg end type register yank-handler)) +(evil-define-operator evil-ex-yank (beg end type register count yank-handler) + "The Ex yank command. +\[BEG,END]yank [REGISTER] [COUNT]" + (interactive "<R><xc/><y>") + (when count + ;; with COUNT, :yank should go the end of the region and yank + ;; COUNT lines from there + (setq beg (save-excursion + (goto-char end) + (forward-line -1) + (point)) + end (save-excursion + (goto-char end) + (point-at-bol count)) + type 'line)) + (evil-yank beg end type register yank-handler)) + (evil-define-operator evil-change (beg end type register yank-handler delete-func) "Change text from BEG to END with TYPE. |
