Closed maxreuben closed 2 years ago
Disable auto-mapping and then bind <Up>
and <Down>
as usual, i.e.
let g:move_map_keys = 0
vmap <Down> <Plug>MoveBlockDown
vmap <Up> <Plug>MoveBlockUp
nmap <Down> <Plug>MoveLineDown
nmap <Up> <Plug>MoveLineUp
Thank you for your help.
Neither Alt nor Ctrl keys are getting mapped in any of my terminals (alacritty, gnome-terminal, tabby). Is there a way to prevent the terminal from prefixing the ESC character somehow? Or at least a workaround so that that it can be mapped in vim? I tried this:
map <ESC>[1;5B <A-Down>
map <ESC>[1;5A <A-Up>
map! <ESC>[1;5B <A-Down>
map! <ESC>[1;5A <A-Up>
let g:move_map_keys = 0
vmap <A-Down> <Plug>MoveBlockDown
vmap <A-Up> <Plug>MoveBlockUp
nmap <A-Down> <Plug>MoveLineDown
nmap <A-Up> <Plug>MoveLineUp
But it didn't work.
You can see what sequence is sent by going into insert mode, typing C-v and then typing whatever you are interested in. If I type Alt-Up in gnome-terminal I get <M-Up>
.
Thanks, I figured it out.
How can i retool this plugin to make it use arrow keys instead of hjkl? Is it possible? I don't know Vimscript so I can't really tell.