Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to switch mappings? #255

Open
alok opened this issue Jan 5, 2017 · 1 comment
Open

How to switch mappings? #255

alok opened this issue Jan 5, 2017 · 1 comment

Comments

@alok
Copy link

alok commented Jan 5, 2017

When I'm writing C, I use { far more than [, so I swapped them in insert mode.

How would I swap their delimitMate mappings as well?

imap <buffer><silent> [ <Plug>DelimitMate{ didn't work.

@adriaanzon
Copy link

adriaanzon commented May 24, 2017

You'd have to set them up just before delimitMate defines its mappings.

Something like this:

autocmd User delimitMate_map imap <buffer> ( <Plug>delimitMate[
autocmd User delimitMate_map imap <buffer> [ <Plug>delimitMate(

Or only for C:

autocmd User delimitMate_map if &ft ==# 'c' | imap <buffer> ( <Plug>delimitMate[| endif
autocmd User delimitMate_map if &ft ==# 'c' | imap <buffer> [ <Plug>delimitMate(| endif

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

No branches or pull requests

2 participants