Code Monkey home page Code Monkey logo

Comments (5)

matze avatar matze commented on May 30, 2024 1

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

from vim-move.

maxreuben avatar maxreuben commented on May 30, 2024

Thank you for your help.

from vim-move.

maxreuben avatar maxreuben commented on May 30, 2024

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.

from vim-move.

matze avatar matze commented on May 30, 2024

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>.

from vim-move.

maxreuben avatar maxreuben commented on May 30, 2024

Thanks, I figured it out.

from vim-move.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.