noctuid/lispyville

Additional movement breaks Clojure

jcf opened this issue · 2 comments

jcf commented

With Lispyville and Lispy I can't insert a pair of square brackets [] because when I type [ my point jumps to the precious closing paren rather than inserting the pair.

I'm 90% sure enabling the additional movement keys with normal, visual and motion states is the cause of the problem.

I think the solution might be to simply remove the motion state but I haven't had a chance to test this theory yet.

Lispy has a function to insert the relevant square bracket pair, if that helps.

BTW, thanks for an awesome library!

Binding keys in other states should not affect insert state. Lispy binds [ and ] by default. You can unbind them or use }.

(define-key lispy-mode-map-lispy "[" nil)
(define-key lispy-mode-map-lispy "]" nil)

This is a common question on the lispy repo; I'll probably add it to a FAQ.

jcf commented

I see! I didn't realise typing } would insert a [] pair!

Sorry for the noise.