feature request: vi/vim mode text objects
When using the vi/vim mode, I find myself lacking the general text objects that exists in most editors/shells with builtin vim mode. I'm talking about the following:
- diw
- ciw
- dap
- cap
- vaw
- viw
The basic inside and around text objects. These I find extremely useful when navigating in my shell with the vim mode and want to edit a word I just so happened to be in the middle of.
References
fish has this feature as an example of a shell with vi/vim-like keybinds.
We landed this PR recently which, I think, does some of these. Can you confirm? https://github.com/nushell/reedline/pull/844
That was just the inside delimiter text objects: i"/i( etc.
We landed this PR recently which, I think, does some of these. Can you confirm? #844
My request is I suspect an expansion on the pull request you mention. My request is to add the word and paragraph text objects from vim. Though the pull request goes a long way as is.
I'd love to have a full/complete vim keybind solution with configurable keybinding. Most of the vim stuff is hard coded. Would love to change that.
It would be great if one also could customize it. Currently ci) works, but I would like to add cib or maybe add my own delimiters (like ciq for changing stuff in ``. There seems to be an CutInside Value: <char> <char> edit I could bind, but how can I bind it to ciq?
I'm currently working on (and almost finished) #939 to add word (w), WORD (W), bracket (b) and quote (q) text objects. This includes adding jumping to next quote/bracket/pair if not currently in one. I haven't added paragraph (p) at the moment but that should be quite easy to add in later. Edit: should be finished now, ready for review.