matze / vim-move

Plugin to move lines and selections up and down
http://www.vim.org/scripts/script.php?script_id=4687
MIT License
1.2k stars 56 forks source link

How can I map J K to move block down and up? #65

Closed hungpham3112 closed 2 years ago

hungpham3112 commented 2 years ago

I have some key mappings but it didn't work like I expected.

let g:move_map_keys = 0
let g:move_undo_join = 0  
xnoremap J <Plug>MoveBlockDown                                                       
xnoremap K <Plug>MoveBlockUp
xnoremap H <Plug>MoveBlockLeft
xnoremap L <Plug>MoveBlockRight

I don't want to use default or . Thanks in advance

matze commented 2 years ago

That's not how you map uppercase keys. You have to specify the shift modifier as well, i.e. <S-j> for the first map.