Error in Sublime Text while opening .blade.php - laravel

When I open the Sublime Text editor all text colors go white and there is no exact font color tag wise.
Error while opening sublime text editor:
Error loading syntax file "Packages/Laravel Blade
Highlighter/blade.sublime-syntax": Apparent recursion within a
with_prototype action: 25000 context sanity limit hit

I got the same problem few days ago, and I found there is a solution; a CSS 3 package is making trouble working with the Laravel Blade Highlighter package. You should disable the CSS 3 package with Package Control: Disable Package CSS3 on the command palette, restart Sublime Text, and then it will work as expected.
There you can read the comment:
Hi, I'm the author of CSS3. I was able to reproduce the issue when
both the default CSS package and CSS3 were enabled. I recommend
disabling the default CSS package in my install notes, but I
understand that many people can't do that because they use a package
that depends on the default CSS package (like Laravel Blade).
The clumsy workaround is to enable/disable CSS and CSS3. When you're
working on blade files, you can Package Control: Disable Package CSS3
and enable CSS. If you're working primarily with pure CSS files, I
recommend disabling CSS and enabling CSS3.
Sorry, I know that's an awkward solution. If I think of something
better, I'll post it here.

Related

How to set Neovim+SpaceVim to syntax highlight Hugo (markdown, TOML, Go+HTML, CSS) files?

I am on Manjaro using Neovim and SpaceVim vanilla installations. The editor works fantastically well.
Since I am new to vim-style editing, I do not want to mess my configuration. Yet I'm not very savvy about how to add plugins to Neovim+SpaceVim.
I want my Hugo files to have a proper syntax highlighting. Files's content are TOML (.toml), markdown (.md, but not .markdown), Go+HTML (.html with some Go templates inside) and CSS (.css).
I tried to use the vim-go plugin using yay package manager, but there was no syntax highlighting :(
If you could help me, please take into account that I'm very new to this vim-universe. Thanks!

BEM nesting SCSS with parent selectors breaks Sublime Text syntax highlighting?

I'm experimenting with BEM syntax on a project that uses SCSS. My editor is Sublime Text 3 and I'm using SCSS syntax highlighting.
The problem I'm experiencing is that when I nest using the & parent selector as per this article by Mike Fowler, Sublime highlights it red. Here is an example:
The code compiles fine, I'd just prefer that Sublime not flag these as errors.
Can anyone help config Sublime to do just that?
I suggest using the Syntax Highlighting for Sass package for syntax highlighting. Using it and the Neon Color Scheme, which fully supports all the scopes in the Syntax Highlighting for Sass package (disclaimer: I'm the theme's maintainer), your code looks like this:
with no errors (green is a class name, and & is recognized as a special SASS/SCSS symbol). I'm not sure what package you're currently using for SCSS highlighting, but it obviously doesn't recognize the leading -- characters, or anything following leading __ characters, as valid. Switching over to the new syntax highlighting package should help.
I fixed this when I had this issue by selecting View>Syntax>SASS>SCSS This is apparently caused by downloading the original SASS package Sublime.

Does Sublime Text support live editing of CSS/SASS files?

Does Sublime Text support live editing of files?
I'm looking for a better workflow. I really like Sublime Text, but recently I've been spoiled by the "Live Editing" capabilites of tools like Codepen.io and (recently tested) Adobe Brackets. When I go back to Sublime, even Live Reload seems clunky in comparision.
Live Reload: Press Save To Preview..
I'm using the LiveReload Chrome plugin, and depending on the project (Ruby or JS) I'll use Guard or Grunt to watch system files. I like LiveReload. But having to press 'save' on a file to see its changes in the browser is driving me nuts. Even with CSS style injection (no full browser reload), I'm flying blind in comparision to Codepen and Brackets which have instant updates as you type.
Other Tools
** GUI Tools **: I've heard of tools like Codekit and Hammer. Please correct me if I'm wrong, but they seem to do exactly what Gaurd and Grunt do—except no command line.
** Chome Tools Spaces **: The ability to edit Sass in the browser is cool. I've set this up, but I rarely use it. Editing HTML/CSS/Sass in Sublime Text is superior to Chrome Tools in every way. And to that point, it is far superior to Adobe Brackets which is why I don't (at this point) considering using it (Also it seems most of Brackets 'cool features' work on vanilla CSS, and not on Sass).
**Live Style: I've tried this, and I just can't get it to work.
I must have Googled "Live editing Sublime", "Live Refresh Codepen Sublime Text", etc.. a thousand times this year and results have been pretty lousy.
If anyone has any gems of information regard this to add to this PLEASE POST THEM!
Yes it does, all you need is takana: https://github.com/mechio/takana
This tool creates a little server which interacts in live the the loaded css of the page. All you need is to setup the server and add the javascript snippet to your html code (you will obviously remove it afterwards…).
For now only OSX, live editing is even working on different browsers. Welcome to the awesome!

Sass support for sublime text 3

Is there a way to make autocomplete work for scss in the same way it works for css?
For example I type backg and then tab and it gives me background:; but not in scss files...
I have installed all packages to support scss... but there is only syntax highlighting that is working.
You can install Emmet (formerly Zen Coding), it is an extremely powerful tool to do css (and scss), example :
I type bi and press tab and it gives me : background-image: url(|); (with the | your cursor).
If you are interested, please take a look at this:
Emmet for sublime, and all the abbreviation (Emmet is very good with HTML too -- look what is happening when you type, for example, nav>ul>li...)
Now, how to make it works with scss:
The answer is here
You have to install the package sass-textmate-bundle for scss and do what I have wrote.
If you need sass and not scss, check this answer, especially the second response from Alexander Ekdahl

Is there support for XML code hinting / completion in Sublime Text 2?

I am giving Sublime Text 2 a try and I was editing an XML file - that had a DOCTYPE declaration and a DTD - and there seems to be no way to get code hinting / completion when editing the XML document.
I am sure its something simple I am overlooking. I cannot imagine Sublime does not have this kind of functionality, even if provided via a plugin.
Can someone shed some light on this for me?
Sublime Text is first and foremost a text editor.
But, the reason for it's popularity is in large part due to it's extensibility.
Although you could use Sublime's api to create a specific plug-in to do this, Sublime has a few tools that are already helpful in editing xml files and other markup files on a bare install.
Hinting and completions in particular are very easy to add. It shouldn't take a more than few minutes to create a domain specific sublime-completions file for your particular xml.
You can use alt+shift+w to create an xml element, in addition alt+. will close any un-closed xml element.
You may also want to try the Sublime Tag plug-in available through Package Control
Lastly you could also bring this up in the Sublime forums as a plug-in request. There are a lot of helpful folks in the plug-in community.
You can use the 'tag' plugin from Sublime Package Control. It has auto tag closing, linting and other features. The github page for the project is here: https://github.com/SublimeText/Tag
You can install it using Package Control without leaving your Sublime text editor.

Resources