Sublime Forum

Makefile syntax disappeared

#1

Hi,

I was trying out two new syntaxes for Makefile:

I did not like them and after removing both of them, the original Makefile syntax highlighting that was bundled with sublime is gone.

How do I restore it?

I am using macOS 10.14.2. And I looked at copying the contents from this repo github.com/sublimehq/Packages/tree/master/Makefile at ~/Library/Application Support/Sublime Text 3/Packages/User, but I do not see other packages from that repo there. I want to restore to original behavior and directory layout.

Thanks!

0 Likes

#2

You should copy the contents to ~/Library/Application Support/Sublime Text 3/Packages/Makefile, not ~/Library/Application Support/Sublime Text 3/Packages/User

0 Likes

#3

Thanks @addons_zz! Any chance I can restore the default behavior without copying those contents?

0 Likes

#4

It does worked when you copied the contents?

You should be able to restore the behavior by fixing whatever is broken. From here it is hard to guess what it could be.

First try this: https://www.sublimetext.com/docs/3/revert.html

If reverting Sublime Text to a clean install fixes the problem, then, it is just a configuration problem.

If not, it mean your Sublime Text installation got corrupted, and you need to repair it.

0 Likes

#5

It did not work, I copied the dir Makefile (with it’s contents) into ~/Library/Application Support/Sublime Text 3/Packages and it did not work. I restarted sumblime after the copy and still I do not see Makefile as an option.

0 Likes

#6

Installing other packages shouldn’t have any effect on the built in Makefile syntax w/regards to modifying the files at all. The packages that ship with Sublime are kept safely within a folder alongside the binary and are thus untouched, generally speaking. As such, unless you manually deleted the package file or one of those packages deleted it on your behalf, the original files are likely still there.

In fact it appears that the MakeFile Improved package has a plugin that explicitly adds the default Makefile package to the list of ignored packages. That means that Sublime will ignore that package completely; both the shipped version as well as the inadvertent overrides you created when you manually put the package there.

The proper fix in this case is to remove that Makefile folder that you added and then modify your user preferences to remove Makefile from the ignored_packages setting.

4 Likes

#7

Excellent answer @OdatNurd!! This is exactly what happened.

"ignored_packages":
[
  "Makefile",
  "Vintage"
],

After removing Makefile from the list of ignored packages, it all works as before.

I had removed the copied Makefile directory after it failed to work.

Thank you @OdatNurd!! and also @addons_zz!!

2 Likes