Hi, in nivm I can duplicated selected lines (up or down) with:
vim.api.nvim_set_keymap('v', '<S-A-j>', ":'<,'>copy'<-1<Return>gv", {noremap = true, silent = true})
vim.api.nvim_set_keymap('v', '<S-A-k>', ":'<,'>copy'><Return>gv", {noremap = true, silent = true})
using following mapping in doom emacs fails (syntax error), but I'm not sure why:
(define-key evil-visual-state-map "\S-\M-j" ":'<,'>copy'<-1")
(define-key evil-visual-state-map "\S-\M-k" ":'<,'>copy'>")
Executing ":'<,'>copy'<-1" on cmdline on selection seems to work ok (selected lines are duplicated).
​
Here is similar working mapping that duplicates current line and it works ok (in normal mode):
(define-key evil-normal-state-map "\S-\M-j" ":.copy.")
(define-key evil-normal-state-map "\S-\M-k" ":.copy.-1")