mtth / cursorcross.vim

Sane cursorcolumn and cursorline handling
33 stars 1 forks source link

Recommend using unimpaired instead of "-" / "|" maps #2

Open blueyed opened 10 years ago

blueyed commented 10 years ago

The default maps to toggle cursorline / cursorcolumn are also provided by the unimpaired plugin ("coc", "cou", "cox").

The documentation should point at it.

Apart from that, the g:cursorcross_mappings setting is confusing, since the CR/BS maps are done unconditionally (which is a good thing, but it is still a bit odd).

When keeping the default maps, you might want to prefix them with <Leader> maybe?

mtth commented 10 years ago

@blueyed - correct, unimpaired provides these mappings. Given the specific focus of cursorcross, I believe it still makes sense to provide them here. For example, not everyone uses unimpaired. Plus, the default bindings for - and | are rather obscure and very easy to remember for this use case.

g:cursorcross_mappings can be used when someone already has a custom mapping for these keys. This should ideally never be the case for i_<cr> and i_<bs>, which is why they aren't included. It shouldn't be apparent (without looking at the source) that the functionality they implement is based on mappings.

About mentioning unimpaired in the documentation, I haven't actually had time to write a proper doc file yet. If you'd like to write one, or even simply edit the README, I'd be happy to include your changes.

mtth commented 10 years ago

I just took a look at the endwise plugin you mentioned in the other thread. I wasn't aware of any conflicting plugins earlier. It might be worth it to implement a similar check before mapping.