Code Monkey home page Code Monkey logo

Comments (12)

finnng avatar finnng commented on May 29, 2024 5

for mac users, here is snipped i use for moving lines up/down in normal and visual:

inoremap <S-Up> <Esc>:m .+1<CR>==gi
inoremap <S-Down> <Esc>:m .-2<CR>==gi
vnoremap <S-Up> :m '>+1<CR>gv=gv
vnoremap <S-Down> :m '<-2<CR>gv=gv

The order of up/down should be reversed. I just copy your mapping and update a little to make alt+j and alt+k works on macOS.

" Move line up and down in normal mode and visual mode
noremap ∆ <Esc>:m .+1<CR>
noremap ˚ <Esc>:m .-2<CR>
vnoremap ∆ :m '>+1<CR>gv=gv
vnoremap ˚ :m '<-2<CR>gv=gv

from vim-move.

alex-popov-tech avatar alex-popov-tech commented on May 29, 2024 4

for mac users, here is snipped i use for moving lines up/down in normal and visual:

inoremap <S-Up> <Esc>:m .+1<CR>==gi
inoremap <S-Down> <Esc>:m .-2<CR>==gi
vnoremap <S-Up> :m '>+1<CR>gv=gv
vnoremap <S-Down> :m '<-2<CR>gv=gv

from vim-move.

alex-popov-tech avatar alex-popov-tech commented on May 29, 2024 2

was fixed in #71

from vim-move.

matze avatar matze commented on May 29, 2024

Are you familiar with git bisect? If so, please go to ~/.local/share/nvim/plugged/vim-move and run git bisect start then git bisect bad to mark the current commit as bad and for example git bisect good HEAD@{10} to mark the 10th commit (including merge commits) as (one of the last) good commits. Then mark each commit that is checked out with either git bisect good or git bisect bad until Git tells you which commit caused the issue. To stop bisecting run git bisect reset.

from vim-move.

alex-popov-tech avatar alex-popov-tech commented on May 29, 2024

@matze hello, thanks for quick reply!
The problem is - i tried a couple of olds commits like release 1.4 ( or even 1.3 ) and they did not work also
But i will try anyways

from vim-move.

alex-popov-tech avatar alex-popov-tech commented on May 29, 2024

just checked with bisect - none of the commits works...
also all the other commands - move line/char/block - do not work as well...

from vim-move.

efikarl avatar efikarl commented on May 29, 2024

@alex-popov-tech The same to you. Not work on mac, just install 3 days ago, and works that time, now not work.

  1. Checked with all tags and master lastest commit, not work for me.
  2. I removed all my other plugins and keep only vim-move, do step 1 test, still not works for me.

from vim-move.

Kevalin avatar Kevalin commented on May 29, 2024

I have the same issue on my mac.

from vim-move.

normen avatar normen commented on May 29, 2024

I think theres an issue in the latest vim versions on MacOS, I have a <C-Up/Down> mapping to resize windows that also stopped working. Seems like either vim or MacOS broke proper support for the arrow keys..?

from vim-move.

matze avatar matze commented on May 29, 2024

Unfortunately, I really cannot help with these issues since I do not have a Mac. And frankly speaking I suspect this is more of an issue with MacOS' terminal keyboard handling than with this plugin or Vim. I mean that stuff never changed in the meantime.

from vim-move.

normen avatar normen commented on May 29, 2024

Unfortunately, I really cannot help with these issues since I do not have a Mac. And frankly speaking I suspect this is more of an issue with MacOS' terminal keyboard handling than with this plugin or Vim. I mean that stuff never changed in the meantime.

Nobody expects you to fix anything but this is probably the best place to keep all this info 🙂 Thanks for this plugin! ❤️

from vim-move.

zetatez avatar zetatez commented on May 29, 2024

for Mac users

noremap - dd2kp
noremap = ddp
vnoremap - :m '<-2<CR>gv=gv
vnoremap = :m '>+1<CR>gv=gv

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.