Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'dj' and 'dk' don't work #283

Open
caetanosauer opened this issue Mar 7, 2018 · 3 comments
Open

'dj' and 'dk' don't work #283

caetanosauer opened this issue Mar 7, 2018 · 3 comments

Comments

@caetanosauer
Copy link

Deleting the current line and the lines above/below with dk/dj is not working. Is that a bug or because it's not supported? It would also be nice to add quantifiers like d3j, d5k.

@WuTheFWasThat
Copy link
Owner

WuTheFWasThat commented Mar 7, 2018

in general, things are a bit trickier due to nesting bullets and stuff. in particular, i haven't defined behavior for deleting a single line without deleting its descendants. I do think it would be good if dj/dk behaved as expected in cases where it's obvious though

to elaborate some, d+motion is implemented as: "move cursor with , delete selection between old cursor and new as if in visual mode". thus it fails for now since visual mode deletion can't span multiple lines, currently (another limitation). 2 problems with this:

  • this behavior is wrong for dj/dk (should be visual line mode instead)
  • in visual line mode, we only allow selections of entire trees. we need to define delete behavior for individual groups of lines

once addressed, i think dj/dk can work, which would be nice

@caetanosauer
Copy link
Author

Thanks for your response and for developing this awesome tool!

I agree that nesting might make things trickier. You could emulate the vim behavior with folds: if you press dj on the line above a closed fold, that whole fold gets deleted. I think this would also be useful in vimflowy. If that's not the intended behavior, there's always undo.

As for deleting across an open fold, maybe the easiest semantics would be to not do anything and show some error status, since I don't think there's a common agreement on the expected behavior.

I was also wondering about inner-word movements like diw and ciw, which I use a lot in vim. Is that possible in vimflowy?

@WuTheFWasThat
Copy link
Owner

yeah, i think the behavior you describe is how it should work, and consistent with the rest of vimflowy

inner word movements would be great. relatedly, there's a long-standing issue to implement vim-surround: #232

unfortunately, i don't have as much time to work on vimflowy as I used to, so nothing is likely to get implemented soon unless somebody else does it :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants