which version c++ single file in sublime is

To determine the version of C++ in a single file in Sublime Text, you can follow these steps:

  1. Open Sublime Text and navigate to the C++ file you want to check.
  2. Click on "View" in the menu bar at the top of the Sublime Text window.
  3. From the drop-down menu, select "Syntax" and then "C++" to ensure that the correct syntax highlighting is applied to the file.
  4. Press "Ctrl + ` " (backtick) to open the Sublime Text console at the bottom of the window.
  5. In the console, type the following command and press Enter:

view.settings().get('syntax')

This command retrieves the current syntax setting for the active view.

  1. The console will display the version of C++ that Sublime Text is using for the file. It will be something like "Packages/C++/C++.sublime-syntax", where the version number is included in the file path.

For example, if the console displays:

'Packages/C++/C++.sublime-syntax'

It means that Sublime Text is using the default C++ syntax for the file.

Keep in mind that Sublime Text doesn't have a built-in feature to directly determine the C++ version used in a file. The version information may not always be available or accurate, as it depends on the syntax definition file associated with the C++ syntax highlighting in Sublime Text.

If you need to specifically target a particular version of C++ for your file, you can manually set the syntax highlighting to the desired version by selecting "Syntax" > "C++" and then selecting the appropriate version from the list. Sublime Text provides syntax highlighting support for various versions of C++, such as C++11, C++14, and C++17.