Comments (12)
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.
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.
was fixed in #71
from vim-move.
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.
@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.
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.
@alex-popov-tech The same to you. Not work on mac, just install 3 days ago, and works that time, now not work.
- Checked with all tags and master lastest commit, not work for me.
- I removed all my other plugins and keep only vim-move, do step 1 test, still not works for me.
from vim-move.
I have the same issue on my mac.
from vim-move.
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.
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.
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.
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)
- How to restore the position in the line after moving? HOT 2
- Moving block including indents HOT 4
- Using Ctrl + Shift as a modifier HOT 1
- Moving by multiple lines does not work anymore HOT 2
- Undoing a move opens folds
- Only first line is indented when moving multiple lines into another indentation level HOT 6
- Can't move to the right when it finds a tilded character HOT 2
- Options to disable all default mappings? HOT 1
- Ridiculously high CPU usage when moving lines horizontally HOT 2
- move_key_modifier='S'
- How to use this Plugin with arrow keys? HOT 5
- How can I map J K to move block down and up? HOT 1
- [Bug] Moveblockleft and down after that makes unexpected behavior. HOT 1
- feat: Allow usage in only a specific mode, i.e. visual mode HOT 1
- Custom key mapping not working properly in neovim HOT 9
- Better default mappings for macOS: use arrow keys HOT 1
- Out-of-box keymaps for moving are not working HOT 5
- The wrong installation method in vim-plug
- Use S as move_key_modifier
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-move.