macvim-dev / macvim-dev/macvim
Epic: Support dictionary/data lookup in MacVim
Nessuno ha ancora preso questa issue.
- Lingua principale
- Vim Script
- Stelle
- 7.9k
- Fork
- 691
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
- Vimscript API support to look up arbitrary data. Add a new function
- 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
docfolder for technical details and general guidelines. Would be a nice time to update thesrc/MacVim/READMEfile which hasn't been updated forever.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando il lavoro di lookup completato in #1312, #1313 e #1315, quindi ispeziona l’esempio di popup personalizzato e il src/MacVim/README esistente. L’ambito rimanente include un autocmd, popup personalizzati più ricchi, il supporto per balloon e la documentazione; pertanto, il design desiderato e i criteri di completamento devono essere chiariti prima dell’implementazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- macos, vim
- Ambito
- desktop
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100