You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My goal: Map the key combo <C-w>pp to toggling BOTH the left and right sidebars
To do this in standard vim, we could map two commands using '|', but it needs to be escaped '\|' or replaced with it's code '<bar>'. As mentioned here.
This doesn't seem to work in .obsidian.vimrc:
exmap toggleLeftPane obcommand app:toggle-left-sidebar
exmap toggleRightPane obcommand app:toggle-right-sidebar
"These work
nmap <C-w>ph :toggleLeftPane
nmap <C-w>pl :toggleRightPane
" This DOES NOT work, only the left pane toggles
nmap <C-w>pp :toggleLeftPane \| :toggleRightPane
An alternative would be to make a function, but that doesn't seem supported either (I get an error saying 'Not an editor command: endfunction' ).
Is there a way to do this in .obsidian.vimrc?
Note: I've tried mapping both sidebars in Obsidian to the same key, but that didn't work either. This isn't important, just a little convenience I'm hoping to have.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My goal: Map the key combo
<C-w>ppto toggling BOTH the left and right sidebarsTo do this in standard vim, we could map two commands using '|', but it needs to be escaped '\|' or replaced with it's code '<bar>'. As mentioned here.
This doesn't seem to work in .obsidian.vimrc:
An alternative would be to make a function, but that doesn't seem supported either (I get an error saying 'Not an editor command: endfunction' ).
Is there a way to do this in .obsidian.vimrc?
Note: I've tried mapping both sidebars in Obsidian to the same key, but that didn't work either. This isn't important, just a little convenience I'm hoping to have.
Beta Was this translation helpful? Give feedback.
All reactions