Once you’ve done the above, delete everything above this line.
Steps to reproduce
- Install any fresh install of Obsidian from official sources.
- Go to settings, and try to turn on vim
- When prompted to answer vim quit without saving command, type anything that starts with :q (e.g. :qjsdnn , :q!, :qw, :qeohbdmfidg)
- See it allow this and turn on vim mode
Did you follow the troubleshooting guide? [Y/N]
Y
Expected result
Only allow correct vim commands that does quit without saving, that is “:q!” / “:qa!” / “:conf q” / “:cquit” / … (These are the commands mentioned by vim themselves (source: (as I can’t provide links, run this in a machine with vim installed) vim -c “:help :q”)). (Also, more about this is discussed down below in the additional info section.)
Actual result
As long as the answer to the protection box starts with :q, any answer, even if it is wrong, allows vim mode to turn on.
Environment
SYSTEM INFO:
Obsidian version: 1.12.7 (303)
API version: 1.12.7
Operating system: Android 12 (HONOR RBN-NX1)
Webview version: 148.0.7778.178
Login status: not logged in
Language: en
Live preview: off
Base theme: dark
Community theme: Minimal 7.7.4
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Additional information
I’ve only tested this on Android with obsidian installed with Google Play, but I’m petty sure this is unrelated to the version of obsidian I’m using.
This is important to even further make users not let curiosity kill the cat, and make obsidian seem broken.
Also, as there are actually a lot of different ways of quiting without saving.
- “:q” for exiting if ONLY 1 buffer is present AND no buffers are edited.
- “:q!” for exiting if ONLY 1 buffer is present REGARDLESS of if it is edited or not.
- “:qall” (abbr. “:qa”) for exiting REGARDLESS of the amount of existing buffer AND if ALL of the buffers are not edited
- “:qall!” (abbr. “:qa!”) for exiting REGARDLESS of the amount of buffers AND REGARDLESS of the buffers are edited or not.
So either 1) Give more info of the scenario the user is in while answering the question OR 2) All all of them. - For more like :conf q, :cquit, check the vim documentation
But :qAddAnythingHere allowing vim mode to be turned on still needs to be fixed regardless. The above is more of a feature request that it feels relevant enough to include.
Please consider changing this.