I am trying to create a command which deletes preceding whole lines, just like evil-delete-whole-line, but backwards. So far I have the following
(evil-define-operator delete-previous-line (beg end type register yank-handler) "Delete whole line." :motion evil-line-or-visual-line (interactive "<R><x>") (evil-previous-line 1) (evil-delete-whole-line beg end type register yank-handler))
It does delete the previous line, but unfortunately doesn't respond to the count operator. That is if I press certain number before using the operator the behavior isn't the expected one. How can I have the behavior mentioned in the beginning?