Commit b6800d1
[vim] Add a non-recursive map command
This will allow for more powerful mapping capabilities like arbitrary command
remapping, rebinding the home row, etc.
This doesn't quite match Vim's non-recursive behavior because there's no support
for non-recursive keyToKey mappings. Without this support, we'd just be creating
normal, recursive keyToKey mappings which I think would be even more frustrating
and/or surprising (e.g. two inverse non-recursive maps would cause infinite recursion).
Once this support is added for this, though, it will be trivial to create these mappings
at the end of the added function and achieve the most accurate behavior.
One potential paper cut with this implementation is that multiple calls to `unmap` may
be required to fully remove the `noremap`ed values. I think this isn't that severe though
because this looks to be the current behavior with all other `map` operations.1 parent 49490e5 commit b6800d1
2 files changed
Lines changed: 64 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
742 | 743 | | |
743 | 744 | | |
744 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
745 | 784 | | |
746 | 785 | | |
747 | 786 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4245 | 4245 | | |
4246 | 4246 | | |
4247 | 4247 | | |
4248 | | - | |
4249 | 4248 | | |
4250 | 4249 | | |
4251 | 4250 | | |
| |||
4268 | 4267 | | |
4269 | 4268 | | |
4270 | 4269 | | |
| 4270 | + | |
| 4271 | + | |
| 4272 | + | |
| 4273 | + | |
| 4274 | + | |
| 4275 | + | |
| 4276 | + | |
| 4277 | + | |
| 4278 | + | |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
4271 | 4294 | | |
4272 | 4295 | | |
4273 | 4296 | | |
| |||
0 commit comments