vim-unimpaired
vim-unimpaired copied to clipboard
workaround for :move bug with folds. fixes #96
In addition to the workaround, I added a silent!
to the MoveSelectionDown()
function, as I couldn't see a good reason why it wasn't already there, and assumed it was an oversight. Let me know if it was left out for a reason.
silent!
is fine but but it definitely shouldn't apply to the fdm
dance. In fact by doing so you've missed the fact you have a syntax error that completely breaks things.
Can you be more specific? I tested it locally and it works perfectly for me, if something is wrong I doubt it's a syntax error
I'm on mobile but it seems like a | is missing that definitely shouldn't be locally. Either that or for some weird reason it works anyway. Cant check until tonight
Yes a |
is missing. But point being there's no reason to embed all that inside a string eval to begin with.
I agree it's missing, but have you pulled this locally and tried it? The map works, although I honestly don't know why, I would expect it not to now that I've looked more carefully. I am not sure how you would like to see this implemented if not with a string eval, but I'm happy to change it, I just want to see this functionality merged asap
I see now, fdm
isn't getting set back to the value that was saved, although I'm still surprised the move works at all. Fixed
Take your additions and move them outside the quotes onto their own lines.
fixed. do you think it would be better to use window local fdm? setlocal
, let &l:fdm
?
changed it to use local values, that seems much cleaner. tested it and it works fine. should be ready to merge now I think
ping