VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
14.01k stars 1.32k forks source link

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

Open retop56 opened 5 days ago

retop56 commented 5 days ago

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 .md" command (Replace 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):