Unable to use Vim-mode to edit the markdown of previewed images

Currently it’s impossible to use Vim navigation in the preview-mode to edit the markdown of image files. Any image that is previewed just shows up, and doesn’t reveal it’s code. That’s true for internal as well as external images.

I tried various keys like enter, space, TAB or the vim-shortcuts for editing, like i, but that always edits before the image code, not inside.

This is an extremely common situation if one has any images in their vault (among the dozen of us who use Vim mode :sweat_smile:). So it’s an annoyance every couple of minutes.

Steps to reproduce

  • Open the Sandbox Vault
  • activate the Vim mode
  • make sure to be in preview mode
  • either paste an image in to create the image markdown (![[image.jpg]])
    • or alternatively open the existing note called “Images”.
  • Navigate to the line using vim
  • try to edit the image markdown

Did you read and follow the Troubleshooting Guide ?

Yes

Expected result

Essentially the behavior befor the recent update: If I navigate into the line with an image link, then the preview should disappear and just reveal the code, so I can easily navigate. At the very least once I navigate inside the specific image-link markdown (less optimal).

Actual result

The image preview stays. There is no way (except with mouse navigation) to reveal the markdown code of it.

Environment

SYSTEM INFO:
Obsidian version: 1.13.7
Installer version: 1.13.7
Operating system: #1 SMP PREEMPT_DYNAMIC Fri, 21 Aug 2026 22:18:59 +0000 7.1.9-arch1-2
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

Distro Name: EndeavourOS (Arch)
Desktop Environment: KDE
Installation method used: AUR

Additional information

Workarounds

A workaround would be to click with the mouse on the </> icon that pops up, which defeats the idea of using the Vim keyboard navigation.

Another is to use the :image command as noted in the July 30 release notes. It works when I type :image edit. But I can’t set it to a hotkey. My current (failing) attempt for code in my .vimrc:

exmap imageEdit obcommand editor:image-edit

nnoremap <S-TAB> :imageEdit<CR>

It doesn’t work - as it seams the command is not available that way, as the command list I can see via :obcommand (as explained in the Vimrc-Support Plugin) doesn’t show this one. It’s also not as handy anyways.

Related threads

This is the issue as discussed here about the new image system, but relates to the Vim mode specifically. So I was told to make a new thread.

when the image is in focus press enter.

Enter does not work for this in VIM mode. The cursor simply jumps behind the image.

TAB does work. But selects parts of the text, which puts the user in another edit mode. This breaks when using in visual vim mode.

I replicated these behaviors under both Windows and Linux.

<Tab> and <Enter> work in insert mode.

<Tab> and g<Enter> work in Normal Mode

For normal mode, you can also use these commands:

pHLtgdEQ4z

While tab does make it possible to see the image code, it also inserts a tab in both modes.

Neither Enter nor gEnter do anything but move the cursor, and the :image commands do nothing for me.

No, it does not insert a tab. The image needs to be in focus/selected and then you do g<Enter> or <tab>.

Obsidian_POqZNRZC3h

Let me add because I starting to wonder if this other part is not clear, enter is used to to quickly edit the filename part, tab is used to edit the size part.

But the idea of insert mode is to insert the keys I press. So I would expect it to insert the TAB or a new line for Enter. I wouldn’t navigate in insert mode anyway, so I don’t quite follow.

Tab works in normal mode - but it selects text. Differently according to context. It therefore goes into a selection mode. I have to then hit ESC to be able to navigate/type normally again.
As noted: this is not ideal. And it uses up the TAB key. Which is not listed in the hotkey editor… it just doesn’t make sense to me that users should know or expect that.

Further, it doesn’t work at all in visual mode. Then Obsidian adds a tab into the text - indenting the image rather than showing its code.

The g<Enter> suggestion I don’t understand either. Maybe that’s something I’m unfamiliar with, as there there are many ways to use VIM. Maybe someone can chime in if that’s a common command.

I tried to go into that in the “workarounds” section. Typing `:image edit" for every time I select an image is cumbersome. Assigning it to a key for VIM seems to be impossible (the command is unavailable for vim).

That wasn’t clear to me. And it acts differently when there is an Alt-Text or a size definition. I’m not even sure that is an intuitive workflow for non-vim users. Would you expect people to know or predict this without reading the manual? Maybe list it in the hotkeys?
From the VIM side: I would’ve never thought of TAB, nor g<Enter>. Neither do these work in all cases. The former workflow of just showing the code without extra keys, worked great.

I know that VIM support is not the center of Obsidian. But this is broken. And at least an option to turn it off would be necessary.

RIght now,

Insert mode follows the non-vim active case (enter to edit the line, tab to edit the size).
Normal mode has several commands defined to manipulate the image, including some shorthands. We picked g<Enter>, because <enter> does something else already in Normal mode.
Visual mode doesn’t have an expansion right now. This is intentional and I am not sure we should do it.

Vim.mapCommand('g+', 'action', 'imageResize', { direction: 'grow' }, { context: 'normal' });
Vim.mapCommand('g-', 'action', 'imageResize', { direction: 'shrink' }, { context: 'normal' });
Vim.mapCommand('g=', 'action', 'imageResetSize', {}, { context: 'normal' });
Vim.mapCommand('g<CR>', 'action', 'imageEdit', {}, { context: 'normal' });

We don’t make the vimrc plugin. From what I read obcommand is used to map obsidian app-level commands (the one you access in command palette or setting>hotkeys. But these are not that kind of commands. So I don’t see how obcommand would work here.