Add vi mode to pyrepl
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Feature or enhancement
Proposal:
Since PyREPL implements its own readline mechanism, vi mode is not supported anymore unless the user reverts to the old REPL using PYTHON_BASIC_REPL. This comes up from time to time in issues like #118840 or #127706.
I propose a simple vi mode implementation directly in PyREPL which offers basic motion and editing functionality. This should reduce friction for users who prefer to use vi editing mode and are forced to rely on the old REPL for this. Achieving feature parity in this regard with the old REPL might also help fully removing the old implementation.
I can submit a PR with a basic implementation for review, which adds motions and simple editing commands. It still requires adding yank & paste, undo, linewise commands, etc. which I'm happy to implement if PyREPL code owners are happy to move forward with the feature and the design looks reasonable.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
- gh-141375
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách xem xét cơ chế readline của PyREPL và REPL cũ được PYTHON_BASIC_REPL lựa chọn, sau đó đọc PR được liên kết gh-141375. Để hoàn tất, cần thống nhất một chế độ vi cơ bản với các lệnh di chuyển và chỉnh sửa; yank và paste, hoàn tác, cùng các lệnh theo dòng cũng được xác định là phần phạm vi còn lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- cli
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100