Closed blueyed closed 10 years ago
Could you do two quick changes before I merge it? Sure.
The error it'll throw isn't caught and in some cases you want to be able to override your mappings The idea is that the user gets notified about their mapping getting overwritten.
Whereas disabling them is as easy as setting g:cursorcross_mappings to 0. Yes, but you need to be made aware of it.
The error it'll throw isn't caught That would be useful to point at g:cursorcross_mappings. I would have done it, but a try block around all of them would only catch the first error, and I also wanted to avoid having multiple catched errors with the same hint at
g:cursorcross_mappings
.
Just wanted to discuss this a bit - let me know if you still want it like outlined above.
Also, feel free to merge it and then change it like as you see fit, of course.
In my opinion, it's still not a worthy tradeoff to force these errors just to make sure the user is aware of the mappings getting overwritten.
g:cursorcross_mappings
just to suppress the errors.g:cursorcross_mappings
but remapping them somewhere else).I don't mind doing the changes myself if you haven't time. Probably sometime this weekend.
@mtth Sorry, I had forgotten about this and just did your suggested edits.
Let me know, if I should squash/rebase/cleanup.
btw: I am using the following to make it play nice together with delimitMate and endwise.
" Force delimitMate mapping (gets skipped if mapped already).
fun! My_CR_map()
" "<CR>" via delimitMateCR
return "\<Plug>delimitMateCR\<Plug>CursorCrossCR\<Plug>DiscretionaryEnd"
endfun
imap <expr> <CR> My_CR_map()
You might want to add this to the README.
I've just reverted the "cleanup" - see the commit message.
Good to know about the empty string return value. Thanks for the edits!
Thanks!
Could you do two quick changes before I merge it?
autoload/cursorcross.vim
.<unique>
in the mappings inside theif g:cursorcross_mappings
block. The error it'll throw isn't caught and in some cases you want to be able to override your mappings. Whereas disabling them is as easy as settingg:cursorcross_mappings
to 0.