Enhancement: Add buttons to FM editor toolbar to switch between normal editor and diff editor modes #696

Closed
opened 2026-10-05 03:00:40 +02:00 by adam · 3 comments
Owner

Is your feature request related to a problem? Please describe.
When I open a .md or .mdx file via version control ... image

I see that the Front Matter toolbar is displayed above the open file
image

But this toolbar is missing the button to view the file in a normal (non-diff) editor. image which I'm finding rather frustrating.

Describe the solution you'd like

Can you please add this button to the toolbar image when the opened file is in version control diff format to switch to non-diff editor mode

Can you please add this button to the toolbar image when the opened file is in not in version control diff format to switch to diff editor mode

Describe alternatives you've considered

You can get to this button via the source control tree view like so ...
image

But I think this button should also be on the Front Matter editor toolbar as it appears there when Front Matter is not active and feels as thought it's the natural place to find it.

For your reference ... Here's the default editor toolbar (when Front Matter is not installed) that has many more toolbar buttons but the ones above are by far the ones most used.
image

Here's the default editor toolbar when in "diff" mode:
image

**Is your feature request related to a problem? Please describe.** When I open a `.md` or `.mdx` file via version control ... ![image](https://github.com/user-attachments/assets/57701a12-9c6a-49e7-902e-429176c64968) I see that the Front Matter toolbar is displayed above the open file ![image](https://github.com/user-attachments/assets/679c3d2c-0c7a-40ee-8778-c61bde9ef3f5) But this toolbar is missing the button to view the file in a normal (non-diff) editor. ![image](https://github.com/user-attachments/assets/8ffbf238-4d78-4f05-826d-0146327376c9) which I'm finding rather frustrating. **Describe the solution you'd like** Can you please **add** this button to the toolbar ![image](https://github.com/user-attachments/assets/8ffbf238-4d78-4f05-826d-0146327376c9) when the opened file is in version control diff format to switch to non-diff editor mode Can you please **add** this button to the toolbar ![image](https://github.com/user-attachments/assets/815799b5-0d67-4ad1-b282-a7b4578eb0de) when the opened file is in *not* in version control diff format to switch to diff editor mode **Describe alternatives you've considered** You can get to this button via the source control tree view like so ... ![image](https://github.com/user-attachments/assets/4fa1153e-79a0-428f-be51-b2a11591505b) But I think this button should also be on the Front Matter editor toolbar as it appears there when Front Matter is not active and feels as thought it's the natural place to find it. For your reference ... Here's the default editor toolbar (when Front Matter is not installed) that has many more toolbar buttons but the ones above are by far the ones most used. ![image](https://github.com/user-attachments/assets/3cfdbbbf-28ee-499c-9321-6e297999bbc5) Here's the default editor toolbar when in "diff" mode: ![image](https://github.com/user-attachments/assets/6cc8b0e0-1d36-410c-a898-9fa4acee2455) <!-- github-sync-id:2630113797 -->
adam closed this issue 2026-10-05 03:00:40 +02:00
Author
Owner

Hi @tohagan, thank you for the suggestion. The way it works is that FM defines which actions can be shown in the editor title. We don't remove any actions, but VS Code can only show 8 of these actions, and the rest is hidden behind the dotted ... menu action.

What I could do is only enable those actions when editing a file and turn those off when viewing the differences.

Hi @tohagan, thank you for the suggestion. The way it works is that FM defines which actions can be shown in the editor title. We don't remove any actions, but VS Code can only show 8 of these actions, and the rest is hidden behind the dotted `...` menu action. What I could do is only enable those actions when editing a file and turn those off when viewing the differences. <!-- github-comment-id:2454319401 -->
Author
Owner

That way it would look as follows:

When working on a file

Xnapper-2024-11-04-11 21 14-915CEB14-5ADB-4E47-BC2D-5F805364A7B2

When viewing the diff mode

Xnapper-2024-11-04-11 21 29-6596D568-61F9-4345-AF4A-07DEA0AA8D4D
That way it would look as follows: When working on a file <img width="1481" alt="Xnapper-2024-11-04-11 21 14-915CEB14-5ADB-4E47-BC2D-5F805364A7B2" src="https://github.com/user-attachments/assets/8148793a-0b5c-45f6-a443-fc2ca98566ac"> When viewing the diff mode <img width="1480" alt="Xnapper-2024-11-04-11 21 29-6596D568-61F9-4345-AF4A-07DEA0AA8D4D" src="https://github.com/user-attachments/assets/ebf97f6a-84c8-42ce-a461-5d0a467a0f7a"> <!-- github-comment-id:2454327961 -->
Author
Owner

Thank you!!

Thank you!! <!-- github-comment-id:2461303995 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#696