Commit Graph
100 Commits
Author SHA1 Message Date
Matt Ellis 537fa7abca Restore plugin compatibility for Argument.Type 2026-06-26 08:46:30 +02:00
Matt Ellis fea7c44339 Update documentation for 'langmap' related options 2026-06-24 08:40:52 +02:00
Matt Ellis 885bd1e97b Implement 'langmap' support
Fixes VIM-2283
Relates to VIM-2348
2026-06-24 08:40:52 +02:00
Matt Ellis 65cc010dc5 Add semantic source for each keystroke
Provides more details about when a keystroke should be mapped. This semantic information will be required to properly support langmap
2026-06-24 08:40:52 +02:00
Matt Ellis 5c431bc997 Remove DIGRAPH argument type
Since we now have argument types for register and mark, CHARACTER is now assumed to be a character or digraph
2026-06-24 08:40:52 +02:00
Matt Ellis ab423aeab4 Introduce mark and register semantic argument types
Mark and register should be mapped by langmap, from the user's input language to an ASCII mark/register name (not yet implemented)
2026-06-24 08:40:52 +02:00
Matt Ellis e45a8f76dc Remove fallback argument type handling
The digraph consumer is before the char argument consumer, so digraph keys will be processed first. If a key isn't a digraph key, it is ignored and the char argument consumer will process it; the digraph consumer doesn't need to set a fallback argument type and repost the key.
2026-06-24 08:40:52 +02:00
Matt Ellis f9249c4371 Add 'langremap' option, not yet applied
Also supports 'langnoremap' for backwards compatibility with Vim
2026-06-24 08:40:52 +02:00
Matt Ellis 65ebf53d34 Add 'langmap' option, not yet applied 2026-06-24 08:40:52 +02:00
Matt Ellis 732e3cf795 Extract escaped whitespace string tokenizer
Note that the behaviour is slightly different. This allows for a trailing backslash to be handled as an option value.
2026-06-24 08:40:52 +02:00
Matt Ellis 863c131be5 Use transferTo method instead of own copy method 2026-06-22 09:51:19 +02:00
Matt Ellis b0f721ffc2 Refresh VFS after executing shell command
Fixes VIM-4240
2026-06-22 09:51:19 +02:00
Matt Ellis cdc943620b Add extra border around output and ex panels 2026-06-12 06:24:51 +00:00
Matt Ellis 154be17456 Match Vim behaviour with long output
Keys for scrolling down should do nothing when scrolling is enabled for long output. Also adds some notes about 'nomore' behaviour and 'messagesopt' missing "hit-enter" (which can't be tested due to the async timeout).
2026-06-12 06:24:51 +00:00
Matt Ellis 6f67fdbe11 CTRL-C closes message area 2026-06-12 06:24:51 +00:00
Matt Ellis f0c22272ff Implement g< action to show last output 2026-06-12 06:24:51 +00:00
Matt Ellis 7c78f1a51e Show hit-enter prompt for external commands 2026-06-12 06:24:51 +00:00
Matt Ellis 93040783a7 Accept : to start a new command during output 2026-06-12 06:24:51 +00:00
Matt Ellis f21ebe046a Support modeless selection and copy to clipboard
In both output panel and ex entry panel
2026-06-12 06:24:51 +00:00
Matt Ellis cf2ea108ca Extract common glass pane handling 2026-06-12 06:24:51 +00:00
Matt Ellis c11eff4b16 Update the cursor while showing the output panel 2026-06-12 06:24:51 +00:00
Matt Ellis e76c3bb792 Handle empty and blank text
Address VIM-4240
2026-06-12 06:24:51 +00:00
Matt Ellis 90b8e005ae Support 'cmdheight' option for "single-line" output 2026-06-12 06:24:51 +00:00
Matt Ellis ed3c84c610 Force text pane size to ensure lines are wrapped
Otherwise, on first use with 'nomore', wrapped lines are not calculated when we need to scroll to the end
2026-06-12 06:24:51 +00:00
Matt Ellis 4698576a63 Implement per-character line break 2026-06-12 06:24:51 +00:00
Matt Ellis cbea98b0b8 Count wrapped lines 2026-06-12 06:24:51 +00:00
Matt Ellis fbe9f0884d Update prompt when scrolling with mouse 2026-06-12 06:24:51 +00:00
Matt Ellis 742f25bd1c Animate scrolling in output panel 2026-06-12 06:24:51 +00:00
Matt Ellis d6d5fdefd4 Skip IDE shortcut handling when panel is active
Important or the IDE will try to dispatch shortcuts such as `<BS>` while the panel is active
2026-06-12 06:24:51 +00:00
Matt Ellis 856ad4ff86 Update more prompt to match Vim text and behaviour 2026-06-12 06:24:51 +00:00
Matt Ellis 40064654e5 Remove unsupported left+right motions in pager
These don't appear to be Vim shortcuts at all
2026-06-12 06:24:51 +00:00
Matt Ellis efeb6ec0f2 Do not reuse escape key when closing output panel
Unable to test, unfortunately
2026-06-12 06:24:51 +00:00
Matt Ellis 3c998a8da3 Do not reuse space key when closing output panel 2026-06-12 06:24:51 +00:00
Matt Ellis 7e3c745d38 Add helper functions for scrolling up 2026-06-12 06:24:51 +00:00
Matt Ellis 88efb6d4db Simplify key handling
Also fixes incorrect behaviour passing 'q' to editor when at hit-enter prompt, and processing Enter twice, scrolling two lines instead of one (this isn't possible to test, sadly, it depends on Swing key event handling)
2026-06-12 06:24:51 +00:00
Matt Ellis ce9d3bce94 Fix 'nomore' scroll implementation 2026-06-12 06:24:51 +00:00
Matt Ellis 73fbc7681c Clear single-line message after timeout
Introduces the `'messagesopt'` option, plus handling of options that are key/value pairs + flags
2026-06-12 06:24:51 +00:00
Matt Ellis 5638e7296c Remove unncessary parseKeys calls 2026-06-12 06:24:51 +00:00
Matt Ellis c41f82cb7c Clear single line message when mode changes 2026-06-12 06:24:51 +00:00
Matt Ellis 00900dd03f Clear single line message with Escape 2026-06-12 06:24:51 +00:00
Matt Ellis dbc81e734b Prevent clearing message at same time as it's set 2026-06-12 06:24:51 +00:00
Matt Ellis da6befdb60 Include output panel when checking scroll height 2026-06-12 06:24:51 +00:00
Matt Ellis 51514c111a Hide output panel when redrawing status line
We "redraw" the status line at various times (explicit `<C-L>` redraw, scrolling, etc.). Previously, this would clear the status bar, but now that some messages and output use a persistent single line output panel, we make sure to close the output panel too

Fixes VIM-4230
2026-06-12 06:24:51 +00:00
Matt Ellis 5fefedd5ed Add tests for output panel
Changes to UnknownCommand are due to a test for output panel with an unknown command that was returning a string with a trailing space.
2026-06-12 06:24:51 +00:00
Matt Ellis c678146025 Get editor's scroll pane using API if possible 2026-06-12 06:24:51 +00:00
Matt Ellis 77ef75e8f2 Use proper top and bottom border insets
Means baseline of output panel matches ex entry panel. Also fixes offset when scrolling down a page meaning new top line is correctly positioned
2026-06-12 06:24:51 +00:00
Matt Ellis 816e0af60c Move key handling logic to inner class 2026-06-12 06:24:51 +00:00
Matt Ellis ff517e1fe8 Small refactorings and cleanup 2026-06-12 06:24:51 +00:00
Matt Ellis 1e7c8c50cf Use proper helper function to assert ex output 2026-06-12 06:24:51 +00:00
Matt Ellis cdb9d595bc Remove unnecessary APIs from thin API
There is no reason for a caller (presumably an extension) to need to know what the text of the output panel is, or to get/set the prompt text
2026-06-12 06:24:51 +00:00
Matt Ellis a579c87bfa Remove unnecessary APIs from interface 2026-06-12 06:24:51 +00:00
Matt Ellis 9a94e2b33c Use simpler API to show output panel 2026-06-12 06:24:51 +00:00
Matt Ellis 7c365b8fcb Use project JDK 2026-06-12 06:24:51 +00:00
Matt Ellis a222cf0464 Fix output of maps when prefix match fails 2026-06-10 10:21:52 +00:00
Matt Ellis 550652e9af Restore compatibility for external plugins 2026-05-20 07:23:37 +03:00
Matt Ellis 4402a1f001 Fix logic when reading history entries 2026-05-19 12:51:26 +03:00
Matt Ellis 02c522b352 Fix histget() with omitted index 2026-05-19 12:51:26 +03:00
Matt Ellis 2dd76658c1 Extract tracking current history from command line 2026-05-19 12:51:26 +03:00
Matt Ellis c81850982f Do not save empty command line as history 2026-05-19 12:51:26 +03:00
Matt Ellis 2bc2c5e4b2 Push clearing output panel to the test fixture 2026-05-19 12:51:26 +03:00
Matt Ellis 288e885dd9 Encapsulate HistoryBlock and make internal 2026-05-19 12:51:26 +03:00
Matt Ellis d5e917c5c6 Add histdel() history function 2026-05-19 12:51:26 +03:00
Matt Ellis 86aa74550a Add histnr() history function 2026-05-19 12:51:26 +03:00
Matt Ellis 97da421eec Add histget() history function 2026-05-19 12:51:26 +03:00
Matt Ellis 03a44d9855 Add histadd() history function 2026-05-19 12:51:26 +03:00
Matt Ellis ceabada9b1 Add digraph_setlist() function 2026-05-18 11:42:47 +03:00
Matt Ellis bd87ba8d77 Add digraph_set() function 2026-05-18 11:42:47 +03:00
Matt Ellis 9acc676c5c Add digraph_getlist() function 2026-05-18 11:42:47 +03:00
Matt Ellis 7fda1f1772 Add digraph_get() function 2026-05-18 11:42:47 +03:00
Matt Ellis 75fe116e3e Add mapset() mapping function 2026-05-15 17:25:58 +03:00
Matt Ellis 6039227534 Add hasmapto() mapping function 2026-05-15 17:25:58 +03:00
Matt Ellis 80d924e718 Update doc comments
Also makes an interface function into a protected base class function
2026-05-15 17:25:58 +03:00
Matt Ellis bce624cb73 Add maplist() mapping function 2026-05-15 17:25:58 +03:00
Matt Ellis a9f6a4d608 Move showKeyMapping to map command implementation 2026-05-15 17:25:58 +03:00
Matt Ellis d8b6d0a104 Push function to get all mappings to vim-engine 2026-05-15 17:25:58 +03:00
Matt Ellis f06dd610f4 Introduce getMappingInfo helper function 2026-05-15 17:25:58 +03:00
Matt Ellis 489c2c1fc9 Remove unnecessary MappingInfoLayer 2026-05-15 17:25:58 +03:00
Matt Ellis da9274fcf3 Remove unnecessary KeyMappingLayer abstraction
While it does give us a read-only abstraction over KeyMapping, it means we have two methods that do the same thing - getKeyMapping and getKeyMappingLayer without a clear indication of what the difference is. Furthermore, external usages only use getKeyMapping, and the layer isn't used at all.
2026-05-15 17:25:58 +03:00
Matt Ellis 782a163dde Simplify use of keys helper function 2026-05-15 17:25:58 +03:00
Matt Ellis c608161b0d Add mapcheck() mapping function 2026-05-15 17:25:58 +03:00
Matt Ellis 3f9f6adbaa Fix bug fetching maps by prefix
If there were no matching prefixes, it would return all nodes. And if the prefix was an actual match, it would return it twice
2026-05-15 17:25:58 +03:00
Matt Ellis e327fad99c Fix(VIM-4225) Use the same mappings as vim-sneak 2026-05-15 17:25:58 +03:00
Matt Ellis d358c80453 Remove some non-Vim mapping modes 2026-05-15 17:25:58 +03:00
Matt Ellis 64d26a348f Remove unnecessary JvmField annotations 2026-05-15 17:25:58 +03:00
Matt Ellis 00f1021f25 Add maparg() mapping function 2026-05-15 17:25:58 +03:00
Matt Ellis a3aaf1e93a Update list of Vim functions to match Vim 9.2.0411 2026-05-15 17:25:58 +03:00
Matt Ellis 69344812c6 Introduce function to check for mappings 2026-05-15 08:31:53 +00:00
Matt Ellis 03f5fa7c35 Fix(VIM-4104): Allow Tab to move to next component 2026-05-15 08:31:53 +00:00
Matt Ellis 319b5164dc Enable Vim in Java files decompiled from Kotlin
Fixes VIM-4197
2026-04-20 08:45:23 +02:00
Matt Ellis c49ac943fc Remove explicit gradleJvm option, use project SDK 2026-04-20 08:45:23 +02:00
Matt Ellis 9bffb4f42f Fix min arity for remove() function 2026-01-09 19:12:27 +02:00
Matt Ellis 3cdea85df4 Move common functions to collectionFunctions
Add a new package for functions that apply to both List and Dictionary, as well as some String functions (where a String is treated like a collection of characters). Trying to group some functions that shouldn't just sit at top level
2026-01-09 19:12:27 +02:00
Matt Ellis cc1122b3b6 Rename file 2026-01-09 19:12:27 +02:00
Matt Ellis 5adff67ec8 Add List uniq() function 2026-01-09 19:12:27 +02:00
Matt Ellis 8340be8459 Add List sort() function 2026-01-09 19:12:27 +02:00
Matt Ellis 9fbee06890 Add filter() function 2026-01-09 19:12:27 +02:00
Matt Ellis 4bf947a143 Fix comparison of String and Number 2026-01-09 19:12:27 +02:00
Matt Ellis 5225c409d8 Add List reduce() function 2026-01-09 19:12:27 +02:00
Matt Ellis 17eddab2ac Add map() and mapnew() functions 2026-01-09 19:12:27 +02:00
Matt Ellis 00fee97117 Add List indexof() function 2026-01-09 19:12:27 +02:00