Some letters (ß, ƒ) aren't available on Mac

@Pch does Option + b work for you?

Find a .mov here. No community plugins, no css. In any other text input field the ß appears fine, so my keycap can’t cause it.

Ctrl-p and ctrl-n have no mappings in the shortcuts.

but if you are on a mac, should you use cmd-p and cmd-n for vim?

What’s your installer version?
Download and reinstall obsidian.

another thing to try. Does it work in the help vault?

In the Help vault, and in a new vault, option-s for ß does work, surprisingly, but ctrl-p/n for autocomplete backwards/forwards does not. And I checked, but option-s is not bound to anything either in the Obsidian preferences or the general Mac ones.

Note that option-s for ß worked fine in my own vault up until maybe two updates ago.

No, those commands should not be cmd-p/n on a Mac. It’s control-… like in the terminal. For instance, ctrl-r works fine in both terminal and Obsidian for redo. The jump commands ctrl-o and ctrl-i work in Obsidian, too, and also the scroll commands ctrl-f, d, b, and u.

I found that ctrl-o (normal mode for one command then back to insert) doesn’t work in Obsidian either.

Installer version 0.11.0. Will try reinstalling the application now.

Update: Now installer version is 0.11.9, insider build 0.11.10, problems persist.

@WhiteNoise : Just tested on Obsidian Insider’s Build 0.11.10 (no CSS, no 3rd Party Plugins and Vim disabled) and yes, Option + b prints ß instead of going back to the beginning of the word :partying_face: .

I tested also the other problematic letters

and they work on my side too :blush: !

Some other tests I’ve run (following the last post of @VanderG and Legacy Emacs key bindings ON) :

  • Ctrl+ p/n moves the cursor either on the previous line or the next one, here.
  • Ctrl + o inserts newline(s) below the cursor position without moving the cursor.
  • Ctrl + f/b moves the cursor forward or backward one character at a time.
  • Ctrl + d deletes the character on the right of the cursor.
  • Cmd + u is undo.
  • Cmd + Shift + u is redo.
  • Cmd + d deletes the line where the cursor sits.

I’m not sure though (as don’t use most of these hot keys) if those are the expected behavior :innocent: .

@whitenoise More weirdness. This is with Vim enabled, emacs off. The cursor stays at the same spot when I try autocomplete (control-P), but nothing happens… except when I start typing again, letters are printed at the wrong location, not where the cursor is.

@Pch It must be your keymapping, because the standard key combination for ß is option-s, not option-b. And it seems the emacsy key bindings work fine :smile: It’s the Vim ones that fail (some of them).

I’m on Azerty :wink: but just tested on Qwerty and yes, on this one Option + s gives me ß (without any problem) :blush:
I don’t use Vim though :blush: .

Ok so I think there are several misunderstadings here.

First, option+s, you probably have it bind so something in your vault or maybe it is some plugin that took it. That’s why it doesn’t work for you. You can look at your hotkeys or delete .obsidian/config and start fresh.

Second I don’t hink that ctrl-p and ctrl-n have been implemented by codemirror for autocomplete.

https://codemirror.net/keymap/vim.js

They are just remapped to j k.

You can ask suggestions about vim mode in these threads
https://forum.obsidian.md/t/support-loading-vim-commands-from-configuration-vimrc-style/5826/
https://forum.obsidian.md/t/vim-mode-quality-of-life-improvements/429/

@WhiteNoise Checked the config and found an old shortcut for a disabled plugin; now ß prints just fine. Thanks. Earlier you said control-p and control-n did work, but perhaps you meant not in a Vim way? I see now that CodeMirror doesn’t support autocomplete, sorry for the confusion. If only I could code! Autocompletion in Obsidian would be very convenient and I expected Vim support to provide it.

Thank you too. Debugging this made me figure out another bug.

1 Like

Oh dear, please make this optional and don’t break the EMacs navigation keys! I just spent a great deal of time making them uniform amongst the applications I use most.

1 Like

codemirror has few shortcuts that emulate a few emacs shortcuts on mac. That’s all there is and it is still available.

The Emacs navigation keys have been standard in OS X (for apps that respect the OS X text system) for many years, but Electron incompletely (or incorrectly) implemented them so that opt-f is word forward and opt-b is word back instead of ctrl-opt-f and ctrl-opt-b.

Electron ignores the navigation commands in the OS X text system, so they can’t be fixed or remapped with ~/Library/KeyBindings/DefaultKeyBinding.dict. Interestingly, some commands in the text system (like insertText:, insertNewline:, cut: etc.) are respected.

Ancient primitive macintoshes had cut/copy/paste on F2, F3, F4 — so for many years I’ve used ~/Library/KeyBindings/DefaultKeyBinding.dict to keep that muscle memory, and that works fine in Electron apps.

The two apps I use most now are Obsidian and VSCode. VSCode is also Electron, but lets you customize virtually everything, so in VSCode I changed word forward to opt-f and word back to opt-b, along with the shift counterparts for selecting, to match Obsidian so that I could (whose implementation I assume came from the stock Electron implementation).

Here’s a list of the standard Mac OS navigation shortcuts, that have been around since the Internet stone age, and came from NeXT via YellowBox/Cocoa but were based on EMacs:

"^a":					"moveToBeginningOfParagraph:",
"^A":					"moveToBeginningOfParagraphAndModifySelection:",
"^f":					"moveForward:",
"^e":					"moveToEndOfParagraph:",
"^E":					"moveToEndOfParagraphAndModifySelection:",
"^k":					"deleteToEndOfParagraph:",
"^F":					"moveForwardAndModifySelection:",
"~^f":				    "moveWordForward:",
("~f" in Electron),
"~^F":				    "moveWordForwardAndModifySelection:",
("~F" in Electron),
"^d":					"deleteForward:",
"^b":					"moveBackward:",
"^B":					"moveBackwardAndModifySelection:",
"~^b":				    "moveWordBackward:",
("~b" in Electron),
"~^B":				    "moveWordBackwardAndModifySelection:",
("~B" in Electron),
"^h":					"deleteBackward:",
"^p":					"moveUp:",
"^P":					"moveUpAndModifySelection:",
"^n":					"moveDown:",
"^N":					"moveDownAndModifySelection:",
"^t":					"transpose:",
"^v":					"pageDown:",
"^V":					"pageDownAndModifySelection:",
"^o":					["insertNewlineIgnoringFieldEditor:", "moveBackward:"]
1 Like

When 0.11.10 lands will there be any path for me to have keybord word navigation? (opt-f/b, or I could switch back to ctrl-opt-f/b.

Would this be possible with a plugin? I haven’t dug into the plugin API yet.

1 Like

we haven’t changed much. The only thing that we added is the possibility to enable or disable the emacsy hotkeys that codemirror offers for mac in the editor, that’s all.
Previously they were permanently enabled.

Hmm, I got the update today.

I have the Legacy Emacs-style key bindings for macOS turned on.

But, typing opt-f gives ƒ instead of moving forward a word, and ctrl-opt-f does nothing (as before), and opt-b gives instead of moving a word back, ctrl-opt-b does nothing.

I switched VSCode from ctrl-opt-f/b to opt-f/b to match Obsidian, because it (mostly) doesn’t respect DefaultKeybindings.dict.

Would it be possible for me to change this by writing a plugin?

yes, it should be possible.
You need to write an extension for the editor to be precise.

You need to reenable this alt-f, alt-b, alt-d

1 Like

Thanks, I’ll have a go at it over the weekend.