macvim-dev / macvim-dev/macvim

Epic: Support dictionary/data lookup in MacVim

Đang mở
#1,311 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Epic
Ngôn ngữ chính
Vim Script
Star
7.9k
Fork
691
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

It is useful to support the ability to look up a piece of selected / highlighted text in MacVim and show a OS popup that gives you more information. #1191 was the original issue, but this work has ballooned as this becomes more ambitious and need to span multiple commits. Using this epic to track the work and elicit ideas / brainstorm.

  • #1312
    • Basic implementation to support looking up text in the Core Text view:
  • #1313
    • Data detection. Should detect URLs, addresses, etc, using NSDataDetector. Note that WebKit/NSTextView use an internal "Reveal" API, which we don't have access to as a third-party software, so we will not be able to do as good as job as them, especially for things like package tracking and airline numbers.
    • Looking up selected texts (when in visual mode) should look up the whole text, not just the individual words.
  • #1315
    • Vimscript API support to look up arbitrary data. Add a new function showdefinition() so that we can programmatically invoke this.
    • Right click menu should show a "Look Up" item. This makes it easier to trigger the look up without need a trackpad as Ctrl-Cmd-D is a little unwieldy and harder to discover.
  • Others
    • Autocmd to intercept lookups and override what to do (see custom popup as an example)
    • Custom popup. This would allow us to popup arbitrary dialog boxes with Markdown / HTML support using NSPopUp. E.g. show documentation in richer format.
      • Extend balloon to support using this. Right now balloon is too barebone and text only
    • Add documentation to a new doc folder for technical details and general guidelines. Would be a nice time to update the src/MacVim/README file which hasn't been updated forever.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng việc xem lại phần công việc lookup đã hoàn thành trong #1312, #1313 và #1315, sau đó kiểm tra ví dụ về popup tùy chỉnh và src/MacVim/README hiện có. Phạm vi còn lại bao gồm một autocmd, các popup tùy chỉnh phong phú hơn, hỗ trợ balloon và tài liệu, vì vậy cần làm rõ thiết kế mong muốn và tiêu chí hoàn thành trước khi triển khai.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
macos, vim
Lĩnh vực
desktop
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
20/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.