If you're using the MDX extension(opens in a new tab) in Visual Studio Code, you might have noticed that it overrides the default 'Hide Sidebar' shortcut (Command B
on a Mac or Control B
on Windows/Linux).
This can be frustrating if you frequently use this shortcut to toggle the sidebar. Here's a quick
guide on how to resolve this conflict.
Steps to Fix the Shortcut Conflict
- Open the Command Palette:
- On a Mac:
Shift Command P
- On Windows/Linux:
Shift Control P
- On a Mac:
- Search for Preferences: Open Keyboard Shortcuts' in the Command Palette.
- In the search bar of the Keyboard Shortcuts page, type
Command B
(orControl B
for Windows/Linux). - Find the MDX Toggle Bold shortcut in the list.
- To remove the conflicting shortcut:
- Right-click on the MDX Toggle Bold shortcut
- Select Remove Keybinding
- Right-click on the pencil icon next to the shortcut
- Assign a different key combination
- You may need to restart VS Code for the changes to take effect.
Following these steps, you can use the default 'Hide Sidebar' shortcut without conflicts from the MDX extension.
Customizing your development environment to suit your workflow is crucial for productive coding. Don't hesitate to adjust shortcuts and settings to make your coding experience more efficient and enjoyable.
A Note on MDX
Last week, I discovered MDX(opens in a new tab) and thought it was the best thing ever, but now I'm convinced it's completely pointless.
It's too complicated for non-technical people, defeating its purpose of simplifying content creation. However, despite its complexity, it doesn't support type checking by default, which is a significant drawback for maintaining code quality and catching errors early, and enabling type checking is complicated, requiring a lot of error-prone configuration.
Sticking to .TSX
is a more practical and efficient choice for most projects, especially those prioritizing type safety and clear separation of concerns.