Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

autocomplete pair keybindings for international keyboards #2003

Open
Wolfi opened this issue Oct 5, 2015 · 10 comments
Open

autocomplete pair keybindings for international keyboards #2003

Wolfi opened this issue Oct 5, 2015 · 10 comments

Comments

@Wolfi
Copy link

Wolfi commented Oct 5, 2015

Related to #620

In version 0.7.2, if pair-keymap-diffs is enabled ([:app :lt.objs.settings/pair-keymap-diffs]) the ü key inserts [ instead.

@kenny-evitt
Copy link
Contributor

@Wolfi Please try to reproduce this with a build of the latest source version. #620 is tagged as being fixed on master.

@kenny-evitt
Copy link
Contributor

I see now that the fixed-on-master tag for #620 should mean that this is fixed on 0.7.2 too. But this still should be reproduced on the current source version.

@cldwalker
Copy link
Member

We were tracking adding support for this in #1807. I'll reiterate what I said there: having pair keybindings work on international keyboards would be great. Pull requests would be appreciated since none of the core team uses (or is too familiar with) international keyboards

@cldwalker cldwalker changed the title Umlaut 'ü' on enabled pair-keymap-diffs autocomplete pair keybindings for international keyboards Nov 6, 2015
@TeachMeFly
Copy link
Contributor

Hi everyone. This problem can be solved by using codemirror addon, that allready exist in lighttable package, just add this to user.behaviors to apply this addon:

 ;; Normal brackets autoclose
 [:app :lt.objs.editor/load-addon ["edit/closebrackets.js"]]
 [:editor :lt.objs.editor/set-codemirror-flags {:autoCloseBrackets true}]

And you may disable lighttable autoclose plugin (if it enabled):

 [:editor :-lt.objs.settings/pair-keymap-diffs]

This addon also close single quotes(') and add extra new line when you press return inside empty breackets.

@kenny-evitt
Copy link
Contributor

@TeachMeFly – interesting! That would be great if this is a fully general solution.

@Armaklan
Copy link

Work fine on linux and windows with Azerty keyboard (french).
Thx ! :)

@TeachMeFly
Copy link
Contributor

@kenny-evitt Why LightTable have it own autoclose-brackets code instead using Codemirror addon in the first place?

@kenny-evitt
Copy link
Contributor

@TeachMeFly Answering that would require some archaeology of the code history. I'm just guessing, but it could have been because that CodeMirror addon didn't exist when the LT code was added.

@kenny-evitt
Copy link
Contributor

@TeachMeFly Mind submitting a PR to remove the LT code/plugin and add your behavior setting to the default behavior file?

@kenny-evitt
Copy link
Contributor

@TeachMeFly Nevermind – just got to the email notification for #2093!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants