Sublime Forum

Syntax Definition for Non Generic File Extensions

#1

Hi Greetings Earthlings (having written many posts, a regular ‘Hi’ gets a bit boring, like to jazz it up a bit coz I’m so zany…:roll_eyes:)

Moving on…

I’ve saved a text file that contains various bits of potentially useful, but at the moment useless C++ code. (It doesn’t work because I don’t have the skill to understand it, or it’s just broke).
I’ve saved the file as read.Me and set the file type on ST3 (down at the bottom right corner) as C++. However as soon as I reload the file it goes back to text. I don’t want to save it as C++, coz it’ll get caught up in the build process.
I suppose I could just put it in another folder, but I was hoping there might be a “button” to press to make sure that that read.Me file is reconised as C++ ad infinitum.
I’ve tried having loads of C++ keywords on the first line, but maybe I’m missing the point the various posts are making on that subject…

I have read these:
https://www.sublimetext.com/docs/syntax.html

and looked at this:

I wondered if this was what i needed…ApplySyntax

Am sure I’m missing something simple…

Cheers…

Lozminda

0 Likes

Weird "Voids" Appearing in Files
#2

While you have the folder open, use View > Syntax > Open all with current extension as... and pick C++ from the list.

0 Likes

#3

I knew it’d be something easy ! Thanks.

0 Likes