Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Epic: Support dictionary/data lookup in MacVim

未关闭
#1,311 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
macos, vim
领域
desktop

调研方向

首先查看 #1312、#1313 和 #1315 中已完成的 lookup 工作,然后检查自定义 popup 示例和现有的 src/MacVim/README。剩余范围包括一个 autocmd、更丰富的自定义 popup、balloon 支持以及文档,因此需要在实现之前明确所需的设计和完成标准。

由索引模型根据 Issue 内容生成。

描述

Epic

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.
主要语言
Vim Script
星标
7.9k
派生
691
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

macvim-dev/macvim 的其他 Issue

查看 macvim-dev/macvim 的全部 Issue

相似的 Issue

更多 Desktop Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。