Can't turn off autoclose tags in Adobe Brackets - adobe-brackets

I recently updated to brackets 1.8 and now I can't disable the auto close brackets. I've got this in my Braskets.json file
"closeTags":
{
"dontCloseTags": [],
"indentTags": [],
"whenOpening": false,
"whenClosing": false
}
Any ideas?

Just realised what the issue is. I needed this line
"closeBrackets": false,

Related

Unable to change Beautify indent size

I'm trying to change the indent size for CSS/SCSS to two spaces in Atom Beautify, but it has no effect and the indent remains at four spaces. Even if I set it to two spaces in my .jsbeautifyrc file, it has no effect. Am I missing something?
{
"indent_size": 2,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse-preserve-inline",
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"break_chained_methods": false,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0
}
atom-beautify uses its own configuration, which can be changed in the following two ways in Atom:
In the Settings GUI
Ctrl + , to open Settings (or File > Settings)
Select Packages
Find atom-beautify and click on Settings
Find CSS and click to expand the Settings for CSS
Enter your desired indent size where it says Indent Size:
Repeat previous 2 steps for SCSS
In config.cson
File > Config... to open config.cson
Add the following
"atom-beautify":
css:
indent_size: 2
scss:
indent_size: 2

I have an issue, following code is not working in Internet Explorer 6/7/10:

My jplayer is not working on ie7/8/10, first it gives me syntax error to Jplayer.swf i soved this problem,now IE shows the message like "To play the media you will need to either update your browser to a recent version or update your Flash plugin. " I am not getting what is happining, can anyone help me?
here is my code:-
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
},
[
{
title:"credit",
mp3: "<?php echo home_url('/audio/'.$_COOKIE['gita_language'].'/credit.mp3'); ?>"
} ]
, {
playlistOptions: {
loopOnPrevious: true,
autoPlay: true
},
loop: true,
/*swfPath: "js",*/
swfPath: "http://www.jplayer.org/2.0.0/js/Jplayer.swf",
supplied: "mp3, ogg, wav",
wmode: "window",
smoothPlayBar: true,
keyEnabled: true,
solution: "html,flash"
});
To play the media you will need to either update your browser to a
recent version or update your Flash plugin.
Did you try updating the Flash plugin in your browser? And unless you have a specific need to support them you would do well to forget about making it work in IE6 or 7, and possibly even IE8.
try to update new flash player plugin that will make the magic to work

Disable tag completion in (grunt-contrib-)htmlmin

I have a rather typical PHP project in which the header/footer parts of pages are reused and therefore placed in separate files that I simply require from the main file.
This means, however, that my _header.php-file ends in an open <article> tag (which is then "closed" at the beginning of _footer.php).
The problem is that htmlmin interprets this as an error on my part and adds closing article, body and html tags in _header.php. How do I 'disable' that? I've read through the GitHub pages of grunt-contrib-htmlmin and html-minifier without much luck.
My Task Config
htmlmin: {
dist: {
options: {
minifyJS: true,
removeComments: true,
collapseWhitespace: true
},
files: {
'staging/index.php': 'index.php',
'staging/support/index.php': 'support/index.php',
'staging/inc/_header.php': 'inc/_header.php',
'staging/inc/_footer.php': 'inc/_footer.php'
}
}
}
Bonus brownie points if you can also tell my why minifyJS: true seems to be ignored
Thanks.
One solution, I know not ideal, would be to use the ignore comments by wrapping your markup in:
<!-- htmlmin:ignore -->
https://github.com/kangax/html-minifier#ignoring-chunks-of-markup
Or perhaps you could use a different tool like HTML Clean:
https://www.npmjs.com/package/grunt-htmlclean
I searched for a solution, I looked at the documentation, I read several blog posts and I found out that at this time what you are asking is impossible.
Moreover someone asked a similar question on GitHub, Support for html fragments, but it was closed with the answer:
Hm, I don't think there's much we can do about this, since minifier really needs to be context aware and can't understand what to do with arbitrary, partial chunk of html.
So this is not possible and this is (probably) not going to be implemented in the future.
You can't block that process (with grunt-contrib-htmlmin) because their intent is to specifically prevent users from leaving "uncorrect code".
I did not find any other equivalent grunt-plugin that gives you that possibility.
In the end I think you have only two "solutions" left:
1)Not minifying your php fragments;
2)Divide your code into more parts, minify only the one without unclosed tags, and reunite them all using grunt-include-replace, or a similar plugin, in a new php file.
I had the same issue and fixed it with a combination of htmlmin:ignore and includeAutoGeneratedTags
grunt.js
htmlmin: {
dist: {
options: {
removeComments: true,
includeAutoGeneratedTags: false,
collapseWhitespace: true,
conservativeCollapse: true,
},
files: [
{ src: ['<%= meta.deployPath %>/includes/footer.php'], dest: '<%= meta.deployPath %>/includes/footer.php', nonull: true},
]
}
},
footer.php
<!-- htmlmin:ignore --></div><!-- htmlmin:ignore -->
<footer id="page-footer" role="contentinfo">
...

"Compact" function in Bourbon with SASS not called

I have a problem using mixins included in Bourbon.
When this mixin uses the "compact" function of Bourbon, it just compile it into the css without using it.
Here is a screenshot of the rendred CSS for a box-shadow :
http://i.stack.imgur.com/YF1JB.png
I use it on a non-static site, with the latest Sass version. I use Codekit to compile.
Thanks for help !
Ok so after diving a bit deeper here is how I fixed it.
This problem is probably being caused because of this commit:
https://github.com/thoughtbot/bourbon/commit/ac07c990c0d0fe16f4c455490c9a9fdff7fe27af
The compact function has been rewritten in Ruby to better integrate with Rails.
Initially I just copy pasted the 'stylesheet' folder from the repo. And thats when I started false sytax.
I fixed the error by reading the instructions :) - the instruction on how to install it in Rails and then it worked.
In your case, idk if they have a codekit implementation but I believe you can fix it by adding the following code:
#function compact($var-1, $var-2: false,
$var-3: false, $var-4: false,
$var-5: false, $var-6: false,
$var-7: false, $var-8: false,
$var-9: false, $var-10: false) {
$full: $var-1;
$vars: $var-2, $var-3, $var-4, $var-5,
$var-6, $var-7, $var-8, $var-9, $var-10;
#each $var in $vars {
#if $var {
$full: $full, $var;
}
}
#return $full;
}
(I got the code from the repo)
in a file name _function.scss inside your addons folder and reference it in _bourbon.scss. And that should fix your problem.

jslint options doesn't seem to work on aptana 3

I'm having trouble with jslint, for example when I set the option 'white: true' on aptana, I get even more errors about indentation! but on jslint.com I don't get those messages, the option there works.
Just wondering, is this a known bug, or maybe I'm doing something wrong?
I have in the beginning of the file:
/jslint browser: true, vars: true, white: true/
...and 200+ warning messages :p
/jslint browser: true, vars: true, white: true/
should be
/*jslint browser: true, vars: true, white: true */
BTW, if you go to jslint.org and set the options you want, it produces the exact string you'll need.

Resources