New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<C-w><key> bind not working #67
Comments
@esm7 any idea why it doesn't work? This specific combination just being ignored |
Hi, are you sure the command |
@twio142 it's probably among the many things that broke in the new editor switch and I was unable to get to fix yet. |
I've no idea if upstream will accept a patch but ... not having Execute this abomination (bash shell, will need MAIN_ASAR=/Applications/Obsidian.app/Contents/Resources/obsidian.asar
CACHE_DIR="/Users/$USER/Library/Application Support/obsidian"
TARGET_ASAR=$((ls -r "$CACHE_DIR"/obsidian-*.asar 2>/dev/null || echo "$MAIN_ASAR") | head -n 1)
TMP_ASAR=/tmp/obsidian.asar
UNPACKED_ASAR=/tmp/obsidian.asar.unpacked
TARGET_VIMJS=$UNPACKED_ASAR/lib/codemirror/vim.js
# cleanup
rm -rf $TMP_ASAR $UNPACKED_ASAR
npx asar extract "$TARGET_ASAR" /tmp/obsidian.asar.unpacked
# DOS->unix
sed -i s/$'\r'$// $TARGET_VIMJS
cat <<EOF | patch -r /dev/null -N $TARGET_VIMJS || true
--- vim.js 2022-03-10 00:54:21.000000000 -0500
+++ vim.patched.js 2022-03-10 01:02:05.000000000 -0500
@@ -183,7 +183,7 @@
{ keys: '<C-u>', type: 'operatorMotion', operator: 'delete', motion: 'moveToStartOfLine', context: 'insert' },
{ keys: '<C-w>', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' },
//ignore C-w in normal mode
- { keys: '<C-w>', type: 'idle', context: 'normal' },
+ //{ keys: '<C-w>', type: 'idle', context: 'normal' },
// Actions
{ keys: '<C-i>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true }},
{ keys: '<C-o>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false }},
EOF
npx asar pack $UNPACKED_ASAR $TMP_ASAR
# replace with patched asar
pkill Obsidian
cp $TMP_ASAR "$TARGET_ASAR" And then in my
|
|
I'm trying to bind the following:
But when I'm doing ctrl+w, h nothing happens.
If I change the bind from C-w to or some other key that doesn't involve the control key it seems to work.
The text was updated successfully, but these errors were encountered: