VSCodeVim / VSCodeVim/Vim

:e and :vsp do not respect default editor settings for specific filetype (in this case *.md files)

Open
#9,371 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
After setting Markdown preview as the default editor for "*.md" files, opening a Markdown file using the :e or :vsp command does not respect that setting. Instead, they are opened using the text editor.

To Reproduce
Steps to reproduce the behavior:

  1. Open a Markdown file
  2. Open the command palette (default shortcut: Control + Shift + P)
  3. Type "reopen editor" in palette search bar
  4. Click on "View: Reopen Editor With..."
  5. Click on "Configure default editor for '*.md'...
  6. Click on "Markdown Preview"
  7. Markdown file should now be open as a Markdown preview.
  8. Now close file and reopen using ":e <markdown_filename>.md" command (Replace <markdown_filename> with the actual name of the markdown file)
  9. Notice that the file doesn't open using Markdown preview, but instead uses the text editor
  10. Close file
  11. With the file explorer open on the left-hand sidebar in VSCode, double-click on the Markdown file to open it
  12. Notice that the file is opened using the Markdown preview, which is the selected default editor that was set in steps 4-6

Expected behavior
I expect the ":e" and ":vsp" commands to respect the default editor settings and (in this specific case) open the Markdown file using the Markdown preview instead of the text editor.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.28.1
  • VSCode version: 1.93.1
  • OS: Ubuntu 24.04.1 LTS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VS Code using the :e and :vsp commands after configuring Markdown Preview as the default editor for *.md files. Compare those command paths with reopening the file from the explorer, then trace the VSCodeVim command handling involved. Done means both commands open the configured default editor for Markdown files, with regression coverage if the project has relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.