I can’t manage to move cells around. After a short investigation I noticed that it worked on Chrome but not on Firefox. I believe it is because Firefox has a special selection mode in textboxes relying on they alt key, cf screenshot below
This will probably need another revision, alas keybindings are a minefield.
The command key:
‘Cmd’ on Windows is “the Windows logo key” or the “Windows key”, or the “Start key”, or the “Flag key” depending on who you ask. It’s the key to the left of Alt.
‘Cmd’ on Linux is the “Super” key, which, physically, will have a Windows logo or a ⌘ printed on it, or something else if you have a fancy mechanical keyboard.
We’ll probably tweak the documentation to refer to these with their platform-specific names rather than just ‘Command’. As far as the choice: the Windows key is apparently a bit unusual, but on the other hand, many keybindings are already taken, so we’re just happy to find something that’s (mostly) not resulting in conflicts with other apps.
So far I’m not able to replicate any difference between Firefox & Chrome for the Alt-Cmd-↑ commands - works in both browsers, in Chrome 66 and Firefox 59 on macOS. I’ll test on a Windows box when I have access to one again.
‘Alt’-‘Super’-Up/Down is taken by KDE (on linux) to switch windows, by default. So any other way to rearrange cells would be great. (Perhaps there is one, I just got started).
The perhaps the most natural gesture would be just dragging cells up and down in the editor, perhaps by dragging the ‘#’ link symbol.
The keybinding for commenting lines, on Linux, is Ctrl-/. I don’t have a physical German keyboard with me, but judging by the T1 and T2 layouts I can find online, you’d hit Strg-Shift-7 (or Ctrl, instead of Strg, if that key is untranslated, like on a MacBook’s German layout).
Thx, Tom. Unfortunately this trick doesn’t work. It seems pressing ‘shift’ trips the key detector looking for ‘ctrl’ and NOT ‘shift’. Any chance to toggle keyboard somehow?
We’ve just deployed some improvements to our keyboard shortcuts.
On non-macOS platforms, the commands for moving a cell are now Control-Shift-Up and Control-Shift-Down. On mac, they are still Option-Command-Up ⌥⌘↑ and Option-Command-Down ⌥⌘↓, respectively.
On macOS, we disabled several non-standard commands that were in CodeMirror’s defaults. Option-B ⌥B, Option-F ⌥F, Option-D ⌥D now insert a ∫, ƒ and ∂, respectively. Also disabled: Command-D ⌘D (used by some browsers to create a bookmark), Command-U ⌘U, and Shift-Command-U ⇧⌘U.
Apologies if this has already been discussed elsewhere (perhaps someone can point me to the right place ) but one keyboard shortcut that I think would be really useful is to create a new cell. Is there a standard workflow that people follow? I love Observable so far but I find that I do have to switch to using the mouse to click on the + icons when I want to insert a new cell underneath the current one…
Thank you!
You can use the “split cell” keyboard shortcut (alt-enter) at either the top or the bottom of the cell to create a new cell above or below, respectively. Note that when you create a new cell above the current cell this way, you have to press the up arrow to move the cursor into it, but if you create it below, your cursor starts out in the new cell automatically.
it would be great to have a shortcut for duplicating a cell cell
alternatively you could hold “alt” + drag the blue bar of the cell to the position you want to have that cell duplicated to