In Netbeans, Ctrl-Shift-Up/Down duplicates the current line or selection and Alt+Shift+Up/Down/Left/Right moves the current line or selection. How can this be achieved in VIM 7?
So far, I'm able to get Alt+Shift+Up/Down working using these mappings:
:nmap <A-S-up> :m .-2<Enter>
:imap <A-S-up> <Esc>:m .-2<Enter>gi
:vmap <A-S-up> :m .-2<Enter>gv
:nmap <A-S-down> :m .+1<Enter>
:imap <A-S-down> <Esc>:m +1<Enter>gi
:vmap <A-S-down> :m '>+1<Enter>gv
I'm still strugging with:
- Having Alt+Shift+j/k work like Alt+Shift+Up/Down. Simply changing "up" to "k" isn't working.
- Ctrl-Shift-Up/Down mappings aren't working. Is this an unmappable sequence?
- To map both Alt+Shift+up and Alt+Shift+k to the same command, is there a better way than duplicating the map command to another line?