prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Enable `yank-last-arg` for Vi binding
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
yank-last-arg was enabled for Emacs binding as part of #343.
It would be very useful to have it enabled for Vi binding as well.
I'm using Xonsh and as a workaround for the time being I am using this binding:
@events.on_ptk_create
def custom_keybindings(bindings, **kw):
@bindings.add('escape', '.')
def yank_last(event):
event.current_buffer.yank_last_arg()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Vi binding setup and the existing yank_last_arg implementation referenced by the workaround. Verify how the escape-plus-period binding is registered and test that the Vi binding invokes current_buffer.yank_last_arg(); done means the key sequence works without a custom Xonsh binding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100