Text object mappings should be set uniquely #46

Closed
bootleq opened this Issue Aug 26, 2011 · 4 comments

Projects

None yet

4 participants

@bootleq
Contributor
bootleq commented Aug 26, 2011

Users with cic for classes are mostly already have their implementation.
Users with cic for comments are just having trouble.

@tpope
Member
tpope commented Aug 26, 2011

Hmm, I didn't think about that being used for comments. Maybe I'll change it to ciC instead.

But <unique> mappings are kinda lame. They change a silent collision into a noisy error that the user isn't really in a position to fix.

@AndrewRadev
Member

What about wrapping the whole thing in maparg?

if maparg('ic', 'o') == ''
  " define mappings
endif

Haven't really used it before, but it seems like it could work.

@bootleq
Contributor
bootleq commented Aug 26, 2011

silent! map <silent> <unique> would be fine.

@tpope
Member
tpope commented Aug 26, 2011

I've changed it to iM andaM(think "Module"), and yes,maparg()` is the way to go.

@tpope tpope added a commit that referenced this issue Aug 26, 2011
@tpope tpope Don't clobber user text objects
References #46.
3720d28
@tpope tpope added a commit that closed this issue Aug 26, 2011
@tpope tpope Change ic and ac to iM and aM
Closes #46.
43f6057
@tpope tpope closed this in 43f6057 Aug 26, 2011
@dkearns dkearns added the ftplugin label Sep 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment