I'd like to execute an evil-ex command from another command. Specifically, I'd like to do :'<,'>move'>+1
but when I do, it doesn't quite do the right thing. Instead of moving the text down, it moves it one line from the top of the file.
Here's what I'm using:
(defun evil-visual-move-line-down ()
(interactive)
(evil-ex-call-command
(evil-ex-range (evil-ex-line (evil-ex-marker "<") nil)
(evil-ex-line (evil-ex-marker ">") nil)) "move" "'>+1"))
(define-key evil-visual-state-map (kbd "J") 'evil-visual-move-line-down)