Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I default to "*.*" instead of "Plain Text" in visual studio code?

When I create a new file I use Ctrl + n, so when I save the file I use Ctrl + s, the save as type defaults to: Plain text (*.txt,*.gitignore)

So I keep accidentally saving my files as file.js.txt instead of `file.js.

How do I change it to selecting All files (*.*) by default in the save file dialogue so that doesn't happen?

like image 694
fedda Avatar asked Oct 31 '18 10:10

fedda


People also ask

How do I change the default settings in VS Code?

The easiest way to reset VS Code back to the default settings is to clear your user settings.json file. You can open the settings.json file with the Preferences: Open Settings (JSON) command in the Command Palette (Ctrl+Shift+P).

How do I change the format style in VS Code?

Code formatting You can format an entire file with Format Document (Ctrl+Shift+I) or just the current selection with Format Selection (Ctrl+K Ctrl+F) in right-click context menu. You can also configure auto-formatting with the following settings: editor. formatOnSave - to format when you save your file.

How do I restore default view in VS Code?

Go to File -> preferences -> settings. On the right panel you will see all customized user settings so you can remove the ones you want to reset. On doing so the default settings mentioned in left pane will become active instantly.

How do I turn off auto format in VS Code?

How do I turn off auto format in VS Code? Open VS Code editor and click the “Settings” icon. Search “Formatter” and select the formatter for which you want to disable auto format. Find the “Editor: Format On Save” option and uncheck the box next to it.


1 Answers

Just set the defaultLanguage in the settings.json.

  1. Click on the File.
  2. Click on the Preferences.
  3. Click on the Settings.

or just shortcut CTRL + ,

  1. Find the files.defaultLanguage property.
  2. Enter the prefered language.

enter image description here

or click the Copy to Settings, and then add the file type in the right pane. such as :

"files.defaultLanguage": "javascript" // or "batch" - to set it as "."

  1. Save it (CTRL + S)
like image 68
Yevhen Laichenkov Avatar answered Sep 27 '22 19:09

Yevhen Laichenkov