Closed cfehse closed 5 years ago
A possible solution for this problem would be to change the default binding:
Evaluate current form/selection inline and print to output
to ctrl+alt+c v
Send current form to REPL window and evaluate it
to ctrl+alt+c ctrl+alt+v
to keep the symmetry. I tested this keyboard shortcuts under Windows und Linux and it works as expected.
The default binding was changed to ctrl+alt+e
because that with some kombination of languages and operating system the previous shortcut produced some other glyph. It's entirely possible that ctrl+alt+v
produces a glyph for someone.
It is a bit insane that VS Code does this. There should be an issue filed about it.
Until then, it is probably better to update the README with the gotcha and have a wiki page that can provide some tips and collect suggestions on how to customize the shortcut.
You can do this, but with the current default binding for one of the most important commands you can be sure that all windows user with:
keyboard layouts will have this problem. It cost me over an hour to figure it out (I will open a bug for VScode as well). I am currently looking how to attract people to clojure and having an understandable IDE with an at least good REPL development workflow seems essential. Cursive is in many ways better but here the workflow is much how the lispian way should be at least I think. So I will go through the different keyboard layouts and try out what happends. I tried the major locales (include Swedish) and ctrl+alt+v
works and and ctrl+alt+e
does not.
Thanks for insisting. Not good with defaults that fail for such a large category of users.
I opened an issue for vscode for this behavior. Let's see what happens on there side. I will test the remaining layouts und report, if they all work.
I dont understand this issue. When i test it on windows with German Layout (also with Neo2) i dont get any problems.
When i press ctrl+alt+c ctrl+alt+e
it sends the form to the nrepl window without any problems.
@kstehn Please open die "Keyboard Shortcuts" and try to change/add a shortcut containing ctrl+alt+e. Does the editor work as extected? I tested it on 3 different machines and on all systems the sequence was translated to e.
@kstehn Which locale is configured on your Windows system?
@kstehn What character produces ctrl+alt+e in an source editor windows? On my system it produces die € character.
@cfehse
the local is deDE
and when i change keybind to ctrl+alt+e
it sends the form to the window.
Without the keybind change i also do get €
@kstehn I can reproduce the behavior on Windows 7 and 10 with English and German Locale and German(Germany) keyboard layout. I will take a deeper look into this. Thanks.
Let me get this straight... So on deDe
locale, both alt+e and ctrl+alt+e (unbound by Calva) produces €?
yeah i didnt know this either
Is this only in VS Code or generally?
VS Code interpreting the second chord of a keyboard shortcut that way is a separate and insane matter...
no its also in my browser so
@kstehn @PEZ I will look a some stock Windows system tomorrow - installations I have never touched. So I will see if I can reproduce the issue there.
So I tried on a new system:
That looks wierd. Same System and it looks like this:
@kstehn Is your system native or hosted in a virtual machine?
@cfehse its native
@kstehn okay let's have the vscode guys take a look at this. Even in Notepad++ I can define a shortcut for ctrl+alt+e
and it works like a charm.
Did v2.0.40 fix this? If so, close the issue.
@PEZ Yes you changed this on Windows.
Nevertheless I leave a reference to the corresponding vscode issue: Windows Ctrl+Alt+E get translated in keyboard shortcut as E
VS code interprets
ctrl+alt+e
in all editors and input fields as the€
character and as part of a keyboard shortcut simply as thee
character on Windows. The extension defines a shortcutctrl+alt+c ctrl+alt+e
which is therefore executed as the chordctrl+alt+c e
.So the command "Send current form to REPL window" always executed "Evaluate current form inline" when invoked through the keyboard shortcut even though the same command invoked using the command prompt (
ctrl+shift+p
) triggers the expected command.