Files
macvim-mirror/runtime/doc
Yee Cheng Chin d8a4dcbe89 Add Vim script support and a popup menu for data lookup
Add a new Vim script function `showdefinition()` that allows Vim script
to call back to macOS's data lookup feature and show the definition /
URL preview / etc for any text, at a designated row/col position. If the
row/col are not provided this function will just show it at the cursor.

Also, add a new autoload/macvim.vim for utility functions to call
showdefinition() for selected texts and the word under cursor. Make a
new right-click popup menu "Look Up" call that when there are selected
texts in visual mode to make the lookup functionality easier to access
for users without a trackpad (since Ctrl-Cmd-D is a little obscure and
unwieldy to use). For the utility functions, it was a little hard to
determine how to get the text under visual selection without yanking (we
don't want to pollute the register here), and just implemented a
function to take care of all the edge cases including visual/block/line
modes and selection=exclusive. It could be useful in other situations.

As a side refactor, change the message handler in MacVim from if/else to
switch case. In optimized builds, they both essentially optimize to the
same thing, but for debug builds, the if/else statements have to step
through one by one, and switch case just makes more sense for a giant
message ID lookup like this.

Part of Epic #1311
2022-10-14 19:32:50 -07:00
..
2022-06-28 13:44:46 +01:00
2022-07-29 21:36:21 +01:00
2022-10-04 16:28:45 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-09-27 17:30:34 +01:00
2022-10-03 18:04:35 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-07-01 18:45:04 +01:00
2022-10-03 18:04:35 +01:00
2022-06-28 13:44:46 +01:00
2022-09-27 17:30:34 +01:00
2022-08-26 18:01:12 +01:00
2021-06-27 15:18:56 +02:00
2022-02-26 12:25:45 +00:00
2022-06-28 13:44:46 +01:00
2022-07-25 15:42:07 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-09-27 17:30:34 +01:00
2022-10-03 18:04:35 +01:00
2022-09-18 13:04:22 +01:00
2020-05-26 21:20:45 +02:00
2022-09-27 17:30:34 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-09-18 13:04:22 +01:00
2022-09-27 17:30:34 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-10-03 18:04:35 +01:00
2022-09-18 13:04:22 +01:00
2022-09-27 17:30:34 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2020-01-14 19:29:13 +01:00
2022-07-25 15:42:07 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-10-03 18:04:35 +01:00
2022-09-27 17:30:34 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-09-27 17:30:34 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-09-18 13:04:22 +01:00
2022-06-28 13:44:46 +01:00
2022-09-10 13:13:14 +01:00
2022-07-29 21:36:21 +01:00
2022-06-28 13:44:46 +01:00
2022-10-03 18:04:35 +01:00
2022-06-28 13:44:46 +01:00
2022-07-25 15:42:07 +01:00
2022-09-18 13:04:22 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-06-28 13:44:46 +01:00
2022-09-10 13:13:14 +01:00
2022-06-28 13:44:46 +01:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2022-02-20 19:48:20 +00:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2020-07-26 17:00:44 +02:00
2022-01-23 12:07:04 +00:00
2022-01-23 12:07:04 +00:00
2022-01-16 14:46:06 +00:00
2021-06-13 19:02:49 +02:00
2021-06-13 19:02:49 +02:00
2022-06-28 13:44:46 +01:00
2022-09-04 17:45:43 +01:00
2022-06-28 13:44:46 +01:00
2021-12-05 21:54:04 +00:00
2021-12-05 21:54:04 +00:00
2022-01-16 14:46:06 +00:00
2022-07-01 18:45:04 +01:00