Skip to content

Use noremap to avoid problems with overridden built-ins#14

Merged
numEricL merged 3 commits into
numEricL:mainfrom
AndrewRadev:use-noremap
Feb 10, 2026
Merged

Use noremap to avoid problems with overridden built-ins#14
numEricL merged 3 commits into
numEricL:mainfrom
AndrewRadev:use-noremap

Conversation

@AndrewRadev

@AndrewRadev AndrewRadev commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

If <c-o> is mapped to something else, for instance, this prevents the mappings from working correctly. This happens to be the case in my config (mapped it to <c-x><c-o> for simpler completion, not that I use it much), so I hit the problem when trying the plugin out.

Using noremap there works fine for me, and it shouldn't cause problems with <Plug>, according to the docs of :help noremap:

Note: When appears in the {rhs} this part is always applied even if remapping is disallowed.

If <c-o> is mapped to something else, for instance, this prevents the
mappings from working correctly.
@numEricL

numEricL commented Feb 9, 2026

Copy link
Copy Markdown
Owner

Ah, I see what you mean about your setup. Unfortunately map is necessary here since users may have a recursive map defined and table.vim should keep that behavior in the context-aware map. Actually it does work, but it is not Vim 8.2 compatible.

I think if we instead defined an imap for <plug>(table_align) then the <c-o> wouldn't be needed in the first place.

@numEricL

numEricL commented Feb 9, 2026

Copy link
Copy Markdown
Owner

What do you think about these changes? It resolves your issue on my setup.

@AndrewRadev

Copy link
Copy Markdown
Contributor Author

It works fine for me, yeah 👍

@numEricL numEricL merged commit 868c32c into numEricL:main Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants