jskinner / defaultpackages Goto Github PK
View Code? Open in Web Editor NEWOld bug tracker for Sublime Text's "Default Packages", e.g. bad syntax highlighting
Old bug tracker for Sublime Text's "Default Packages", e.g. bad syntax highlighting
From @RomanBrodetski on July 2, 2014 12:40
Ruby code is highlighted as it was a string after
index / 2
code
Copied from original issue: sublimehq/sublime_text#363
From @nash900 on September 30, 2014 3:37
When using "goto symbol (ctrl+R) " for C language, it lists more symbols than expected. Here is an example file:
struct dac_module {
void *hw;
};
void dac_func1(struct dac_module *dev_inst, uint32_t param1)
{
}
void dac_func2(struct dac_module *dev_inst, uint32_t param2)
{
}
If using "goto symbol", it will list:
dac_module
dac_func1
dac_module // should remove, "struct dac_module *dev_inst" is just a pararmeter here
dac_func2
dac_module // should remove
Does it possible to make "ctrl+R" to show symbols but not include those in "()"? Thanks.
Copied from original issue: sublimehq/sublime_text#505
From @dimhotepus on December 5, 2014 9:39
As you can see, right square bracket after NotNull attribute is italic, but should be normal, as a left
square bracket.
Stable Channel, Build 3065
Windows 8.1
Copied from original issue: sublimehq/sublime_text#598
From @ashishnegi on September 23, 2014 6:51
I have this cpp file which may look a little weird but it is perfectly valid cpp compilable code but it breaks the "Go To Symbol" or other "Symbol Highlighting" things in sublime.
void Function1()
{
if (true)
{
for (;;)
{
if (true)
{
if (true)
{
#if !MAC_PLATFORM
if (true)
{
#else
if(true)
{
//.. hello here
}
#endif
cout<<"here";
#if !MAC_PLATFORM
}
else
{
if (true)
{
if (true)
{
}
}
}
#endif
}
}
}
}
}
void Function2()
{
}
Just copy paste this code in a cpp file and you would see that Function2 does not appear in "Go TO Symbol" List.
ST 3065
Windows 7 64 bit
Thanks
Copied from original issue: sublimehq/sublime_text#488
From @maletor on July 1, 2014 22:41
Refer to braver/Solarized#30 for a graphical explanation.
respond_to
and other Rails 3 symbols are available but it stops short of before_action
and probably others.
Copied from original issue: sublimehq/sublime_text#360
From @genr8r on October 3, 2014 19:25
There appears to be an issue in using border-bottom-radius-right and border-bottom-radius-left. The css does not highlight correctly in ST3 and it is not rendering in the browser after the css is saved.
Using a clean version of ST3 (build 3065) with no plugins or tweaks
Mac OSX 10.9.5
FF 33.0 (beta9)
Copied from original issue: sublimehq/sublime_text#509
From @nimr0d on August 18, 2014 20:4
Used $().append("" +
"" +
"");
to include some html script tags. Inside the quotes are some backslashes for escaping quotes. I commented out a few of the lines (i.e. "" + ) and some are highlighted correctly, but some are not highlighted at all. Chrome renders the javascript with the commenting how I intended, so the problem is with sublime.
Copied from original issue: sublimehq/sublime_text#428
From @ForceGROUP on September 21, 2014 3:58
When I use using namespace xxx; several consecutive namespace references become invalid, as shown below
#ifdef __cplusplus
extern "C" {
#endif
int foo();
#ifdef __cplusplus
}
#endif
Syntax highlighting C ++ 11 third-party analytic normal,
SublimeText own syntax highlighting for C ++ parsing error, the impact is all Sublime users, so this problem should be solved owned SublimeText
Copied from original issue: sublimehq/sublime_text#487
From @dalgard on August 17, 2014 16:55
It's possible to outcomment a parameter in a function declaration/expression like this: function (/*param,*/ otherparam) {}
. Currently this doesn't get highlighted as a comment. Thanks :)
Copied from original issue: sublimehq/sublime_text#425
From @envygeeks on January 15, 2014 6:14
Kernel#require_relative
was added in 1.9 and behaves like Kernel#require
Copied from original issue: sublimehq/sublime_text#216
From @tikiking1 on July 2, 2014 3:19
enum class enum_type : backing_type // This is a valid comment, but ST3 disagrees.
// Same here.
// It restarts normal behaviour after it finds a '{', even when that's in a comment.
{
ENUM_MEMBER
};
Copied from original issue: sublimehq/sublime_text#361
From @winny- on August 14, 2014 0:10
Comments between constants in an enum declaration are not recognized.
Perhaps the Java syntax highlighting borrows from the C++ syntax highlighting, as it appears to have a very similar issue (#361)?
Copied from original issue: sublimehq/sublime_text#419
From @x198501131638 on December 5, 2013 3:21
0X1.Fp10;
the .Fp10 isn't highlighted the same as 0X1
Copied from original issue: sublimehq/sublime_text#196
From @nrichards on December 3, 2014 3:25
The quote (") syntax highlighting can carry on highlighting until the end of file, skipping / ignoring an opening quote, honoring only the closing quote, given a specific Objective-C code block.
I expect for the quote character to start highlighting at an opening quote.
OSX
Sublime 3 Build 3065
Clean ST profile
1 Create a new Objective-C file, e.g. "foo.m"
2 Input the following code block:
- (void)foo {
NSCAssert((1), @";");
int four = 4;
}
3 NOTICE the latter lines, beginning with int
, are highlighted as if quoted.
Expecting the int
line to not be quoted. Xcode renders this code correctly.
ASIDE: The markdown engine here on github.com appears to also have the same highlighting bug.
Copied from original issue: sublimehq/sublime_text#591
From @MrSimonHagger on November 26, 2014 21:44
Edited by @FichteFoll (2014-11-26):
Regular expressions in JavaScript may have forward slashes in set/ranges without escaping.
http://stackoverflow.com/questions/9226731/escape-forward-slash-in-jscript-regexp-character-class
var short_regex = /[this is a set/]this should still be part of the regex/;
Workaround: Escape all forward slashes with \
.
Original content:
When the following valid JavaScript RegEx is added into a .js file the code colour hinting stops working beyond the point of inclusion.
It looks like the code hinting is breaking at some point along the RegEx expression. To see the bug add the following to a JavaScript file and look at the effect on the code colouring afterwards:
var test_regex = /^([A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]+(\.?[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~])*)@([a-zA-Z0-9\-_]+)(\.[a-zA-Z0-9\-_]+)+$/;
Copied from original issue: sublimehq/sublime_text#584
From @taroxd on July 26, 2014 3:36
OS: Windows 7 (x64)
ST Version: Build 3059
The Ruby code:
def something
index = 10
index / 2
end
The bug exists only when the local variable is named 'index'
Copied from original issue: sublimehq/sublime_text#398
From @clarkewd on March 20, 2014 4:8
Comments do not work when the syntax is set to AppleScript ( neither Toggle Comment
or Toggle Block Comment
)
It looks like the file AppleScript.tmLanguage
is a very old release, maybe it should at least be updated to the changes from the TextMate version which is now 2 years old but has a commit with the message, Improve comment.line match.
The ST3 included applescript syntax even has this note in it (line 155):
...
<key>comment</key>
<string>
This is not a very well-designed rule. For now,
we can leave it like this though, as it sorta works.
</string>
...
Also, it looks like the file Comments.tmPreferences should also be included to get the omments to work
Copied from original issue: sublimehq/sublime_text#265
From @l1bbcsg on December 24, 2013 6:8
This particular piece of code is highlighted wrong:
goog.json.Serializer.charsToReplace_ = /\uffff/.test("\uffff") ? /[\\\"\x00-\x1f\x7f-\uffff]/g : /[\\\"\x00-\x1f\x7f-\xff]/g;
Github gets it right, so you wont see a bug here.
ST however has a quote in second argument of ternary operator (the one regexp that is taken when test is true
) unterminated causing the rest to be interpreted as a string literal:
I'm not quite sure what's the source of the problem, apparently conditional operator is a part of it and it's only this particular combination.
Noticed in ST3 build 3059
The code is apparently from some google base framework library, found here: http://www.ingress.com/jsc/gen_dashboard.js
Edit: I found another similiar issue in the same code, another set of quotes is not terminated here:
goog.i18n.DateTimeFormat.TOKENS_ = [/^\'(?:[^\']|\'\')*\'/, /^(?:G+|y+|M+|k+|S+|E+|a+|h+|K+|H+|c+|L+|Q+|d+|m+|s+|v+|z+|Z+)/, /^[^\'GyMkSEahKHcLQdmsvzZ]+/];
Copied from original issue: sublimehq/sublime_text#201
From @NiklasRosenstein on August 14, 2014 7:20
static bool FooBar(int argc, char** argv)
{
struct Args {
void* hello;
void* foobar;
Args()
: hellp(nullptr),
foobar(nullptr)
{
}
} args;
for (int i=0; i < argc; ++i)
{
}
return true;
}
Looks like this in Sublime (Build 3059)
Stripping the for-loop or the struct makes it valid again.
Copied from original issue: sublimehq/sublime_text#420
From @Shirk on January 13, 2014 8:39
This is a copy of 'Syntax highlighting broken in long C++ Sources' as can be read on the forums.
I have a C++ file implementing a state machine which consists of roughly 20+ inline C++ class definitions in about 800 lines of code.
With ST2 I could work with this file just fine and the syntax and scope was detected down to the very last line.
ST3 however stops highlighting (and as it looks to me) scope detection somewhere after about half of my code.
I can reproduce this even with a sample file containing a dummy of what my code looks like but using only empty states.
Each class resembles something like this:
class SubStateXX : public BaseState //{{{
{
public:
SubStateXX( StateID id )
: BaseState( id ) {};
virtual void OnEntry()
{
};
virtual void OnExit()
{
};
virtual StateID OnEvent( EventType event )
{
switch( event )
{
}
return GetSuperState();
};
}; //}}}
Here is a sample file to reproduce the error (highlighting stops after line 460):
st3-cpp-highlight-bug.cpp
Copied from original issue: sublimehq/sublime_text#215
From @FichteFoll on September 3, 2014 3:58
Since Python 3.3 the from
keyword may also be used in the yield from <expr>
statement and should not be marked as keyword.control.import.from
in this case.
Copied from original issue: sublimehq/sublime_text#459
From @ochawkeye on March 31, 2014 16:4
Sublime Text 2 Version 2.0.2, Build 2221 (Windows 7) & Sublime Text 3 Build 3059 (Windows 8)
Python string syntax highlighting breaks when the word CREATE
is used in combination with quotation marks.
print "CREATE '%s'" % ('abc') # Missing highlighting
print 'CREATE "%s"' % ('def') # Missing highlighting
print "GRANT '%s'" % ('ghi') # Highlighting ok
print "CREAT '%s'" % ('jkl') # Highlighting ok
print "CREATE %s" % ('mno') # Highlighting ok
print "create '%s'" % ('pqr') # Highlighting ok
Expected behavior would be for %s
to display in purple in all cases.
Copied from original issue: sublimehq/sublime_text#269
From @asciifaceman on October 13, 2014 18:12
I had this line in a function:
sentEmails=`mysql ${OPT_DEFT:+--defaults-file="${OPT_DEFT}"} -Dinventory -ss -e "${query}"`
Everything after it was highlighted yellow (as in inside a brace). I am not 100% sure waht on this line is causing it, but I have narrowed it down to this:
${OPT_DEFT:+--defaults-file="${OPT_DEFT}"}
The one query is edited out for sensitivity but the other is less important so I left it as the demonstration for highlighting.
note: this is fully functional and tested code, I don't know where the highlighter is choking
Copied from original issue: sublimehq/sublime_text#519
From @blipi on July 18, 2014 13:2
Using the following syntax:
using namespace NAME __attribute__((__strong__));
Makes the editor stop coloring code.
Sublime Text 3 (3059)
Copied from original issue: sublimehq/sublime_text#385
From @ForceGROUP on November 7, 2014 17:25
The default Batch file '.cmd' is not recognized, it is recommended that increased in Batch File.sublime-package Batch File.tmlanguage filetype cmd
Copied from original issue: sublimehq/sublime_text#558
From @spumer on July 25, 2014 7:1
When you use SQL-style comment in SQL expression in single-line string the Sublime Text will comment closing quote too.
How to reproduce:
Using software:
Sublime Text 3 (build 3059)
Windows 7 x64 Professional
Copied from original issue: sublimehq/sublime_text#395
From @tadast on February 15, 2014 12:1
I've been working on renewing Ruby on Rails snippets for ruby >= 1.9 and Rails >= 3 in this repo.
The default snippets are built for ruby 1.8 and Rails 2. Both are no longer supported by the maintainers. Moreover, the syntaxes differ a lot and default snippets that come with ST are nearly useless for projects using current versions of ruby and Rails.
My repo is fairly popular and widely used, however, it is quite problematic to get it working seamlessly, because the default Rails package needs to be manually removed to avoid conflicts. Any chance to merge my fork so that it comes as a default Rails package?
Copied from original issue: sublimehq/sublime_text#247
From @rsyring on October 30, 2013 1:25
Sublime Text 3
Windows Build 3047
If you put this string in a python file:
r'''['''foobar
The last triple quote and "foobar" remain string highlighted as well as any text in the file that follows. The only thing that undoes the highlighting is to close the bracket before the triple quote.
Copied from original issue: sublimehq/sublime_text#179
From @jptalton on September 3, 2014 16:50
OSX ST3 3065
when creating a class that subclasses a class with a non-ascii char, the syntax coloring is lost
class Foo < BรกrBizQux
end
while "B" is colored
"rBizQux" is not colored
Copied from original issue: sublimehq/sublime_text#460
From @dalgard on August 16, 2014 21:13
It seems the syntax highlighter doesn't recognize numbers written on the form 1e9
(or for instance 1.0001e6
). Thanks in advance.
Copied from original issue: sublimehq/sublime_text#423
From @2shortplanks on October 8, 2014 21:36
OS and OS version: OS X 10.9.5
Sublime Text Version: Both 2221 and 3065
Did you tried to revert to a freshly installed state? yes
Since Perl 5.14 several new regular expression postfix characters have been added, but sublime text doesn't recognize these when highlighting and colors both the characters and the subsequent following text wrong. For example:
Note that all text after the r
is highlighted wrong (for example the print
is in the quoted color not keyword color)
The current new postfix letters are r
, a
, d
, l
and u
(current as of Perl 5.20, latest stable release). These are documented in the relevant section of the 5.14 Perl Delta
Type this code into the editor and "Set Syntax: Perl"
#!/usr/bin/perl
my $foo = "foo";
my $boo = $foo =~ s/f/b/r;
for (1..100) {
print "$foo $boo\n";
}
Copied from original issue: sublimehq/sublime_text#515
From @Lope on October 2, 2014 16:23
Example
<body data-foo1bar='blah'></body>
Expected behavior: data-foo1bar is highlighted green (meaning it's an attribute name)
Current buggy behavior: data-foo is highlighted green (attribute name) and 1bar is highlighted white, meaning it's seen as page content.
Standards
According to the HTML standard, only capital letters are not allowed in data-attribute names.
https://html.spec.whatwg.org/multipage/dom.html#attr-data-*
Real world
Numbers are accepted in html data attribute names. I've tested in Chrome and FF.
document.body.dataset finds and can use the attrubutes as expected.
Copied from original issue: sublimehq/sublime_text#508
From @jptalton on September 4, 2014 13:16
OSX ST3 3065
when using implicit begin blocks on methods, with proper indentation, the folding ends at the rescue leaving the rest of the code 'dangling'
def foo
...
rescue
...
end
this will result in a folding that loos like:
def foo [...]
rescue
...
end
https://github.com/bbatsov/ruby-style-guide#begin-implicit
Copied from original issue: sublimehq/sublime_text#465
From @leesei on February 5, 2014 4:57
OS and OS version: LDME UP7 / Linux Mint 15
Sublime Text Version: 3059
Did you tried to revert to a freshly installed state? no
Copied from original issue: sublimehq/sublime_text#234
From @marcosrocha85 on September 24, 2014 12:35
I noticed a litte bug on newest version of SublimeText 3, when searching for symbols in a pascal file the "Goto Symbol" doesn't match methods wich have a comment before it:
TFoo = class
//This will match
procedure DoAnyThing;
end;
//This comment doesn't appear at "Goto Symbol"
procedure TFoo.DoAnything;
begin
DoBar;
end;
Copied from original issue: sublimehq/sublime_text#492
From @bmcminn on December 1, 2014 11:29
Windows 7 Professional 64-bit
ST3: 3065
Language: Markdown
Spell check incorrectly assumes the last character of a word preceding a closing bracket ]
is not part of a word.
## Before spell check
- [testing something](stesindsklds)
In the context menu, Spell check correctly suggests "something" as the proper spelling and injects this correction in-place:
## After spell check
- [testing somethingg](stesindsklds)
Seems as though the spell check parser for Markdown misfires on punctuation delimiters.
Copied from original issue: sublimehq/sublime_text#585
From @gatopeich on July 3, 2014 8:26
This is a correct scanf that looks bad with current C syntax:
scanf("%ms", &buf);
This is how it looks in my soda dark theme:
See http://man7.org/linux/man-pages/man3/scanf.3.html#NOTES
Copied from original issue: sublimehq/sublime_text#365
From @ddickstein on May 12, 2014 13:29
I am using ST3 on Mac OS X Mavericks. Here is my code:
class Rational {
def foo = "bar!"
}
println ((new Rational).foo)
The current code for Sublime's Scala package seems to want to stop highlighting the class name when it encounters a space or an open left parenthesis. This works when the class takes parameters to be instantiated. However, in this case, there are no parameters to pass, so the class can be instantiated without parentheses. Sublime highlights from the R in Rational all the way to the end of the line in blue because it has not yet come across a token that would indicate the end of the class name. I think the fix here would simply be to add close parentheses to the list of tokens that would indicate the end of the class name.
Copied from original issue: sublimehq/sublime_text#285
From @marcushat on September 5, 2014 18:37
In ST3 there is an issue with the php syntax definition. When defining the default value of an argument using the short array syntax([ ]
) it highlights the array literal as invalid. It doesn't do this when using
array()
instead or without typehinting the argument. Ran the code and no errors or warnings and it works as expected. Only tested on current build 3065 of ST3.
Example(code used when I discovered this):
<?php
function foo(array &$foobar= [] ) { //array literal gets highlighted
}
function foo(array &$foobar= array() ) { //this is fine
}
function foo(&$foobar= [] ) { //this is fine too
}
?>
Copied from original issue: sublimehq/sublime_text#470
From @leesei on November 18, 2014 17:49
Paste the following code into Sublime Text 3, set syntax as Java.
class Foo {
// this comment is ok()
int bar; // this comment() is recognized as code
}
Copied from original issue: sublimehq/sublime_text#572
From @glang on September 18, 2014 14:2
This is for Build 3065
Copied from original issue: sublimehq/sublime_text#484
From @FichteFoll on August 20, 2014 22:41
Dollar signs ($
) are valid characters for any javascript identifier, which probably everyone knows since jQuery.
From the ECMAScript specification:
The dollar sign ($) and the underscore (_) are permitted anywhere in an identifier. The dollar sign is intended for use only in mechanically generated code.
Thus, the following code is highlighted wrong:
$test = $(".test");
$function = "this is an identifier, not a keyword";
some$var$ = 1;
In the above snippet, (?<![a-zA-Z_])\$(?![a-zA-Z_])
matches only the dollar sign in $(".test")
and should be matched as variable.other.dollar-sign
or similar.
Copied from original issue: sublimehq/sublime_text#431
From @AnnanFay on May 31, 2014 20:25
The Javascript snippets drive me crazy.
This issue was reported before in a different project but doesn't seem to have gotten over here (jshint/jshint#423)
The snippet code should really follow best practices.
Copied from original issue: sublimehq/sublime_text#307
From @remmelt on March 21, 2014 10:24
Reproduce by pasting the following yml into a new file:
---
- name: Add Logstash repository
apt_repository:
state=present
repo="deb http://packages.elasticsearch.org/logstash/1.3/debian stable main"
update_cache=yes
sudo: yes
Actual behaviour: incorrect syntax highlighting, which looks like this:
Expected behaviour: correct syntax highlighting. I assume that would look like this, note the missing colon:
Copied from original issue: sublimehq/sublime_text#266
From @SmallRoomLabs on June 20, 2014 6:1
I've got a .h -file that is colored incorrecty for the statement directly following this particular #define. On ST3 Stable Channel Build 3059. I'm using the "Blackboard" color scheme, but the problem seems to exist on all schemes.
#define PACKED __attribute__((aligned(1),packed))
typedef struct PACKED {
int foo;
} FOO_t;
typedef struct PACKED {
int bar;
} BAR_t;
As can be seen in the screenshot the first 'typedef struct PACKED' is not colored correctly.
Copied from original issue: sublimehq/sublime_text#348
From @jonahbron on October 31, 2014 16:8
Most built-in PHP functions that you type are recognized (and autofilled) by the syntax highlighter. For example strval
, intval
, etc show up as blue (in the default color scheme).
But the boolval
function (new as of PHP 5.5) is not autofilled or highlighted differently.
Ubuntu 14.10
SublimeText build 3066
Monokai color scheme
Copied from original issue: sublimehq/sublime_text#544
From @samhitov on December 2, 2014 19:18
Keywords like case
are highlighted red. But they should not be highlighted red when next to a hyphen or slash, as in sort --ignore-case
or stat /var/log/case/suitcase.log)
.
In this situation, case should be treated as though it were any other word.
Here are two examples (build 3065):
After the keyword match, all code that is normally white is highlighted yellow instead.
Copied from original issue: sublimehq/sublime_text#590
From @jdb6167 on September 18, 2014 22:36
Admittedly, this is a trivial issue, but I thought I'd report it nonetheless.
I have the following string in a Python file:
"INSERT INTO db (username, phone_number, first_name, last_name, \
street_address, city, state, country, zip_code) VALUES ('"+ username +"', \
'"+phone_number+"','"+first_name+"','" + last_name + "','" + street_address + "',\
'" + city +"','" + state + "','" + country + "','" + zip_code + "')"
The names following VALUES are local variables. This runs fine in the Python terminal, but Sublime highlights the local variables as being part of the string. I'm running Build 3065 on Ubuntu 14.04.
Copied from original issue: sublimehq/sublime_text#486
From @ipeet on July 24, 2014 21:29
In command mode, the number of lines captured by sequences of the form "yXj" is incorrect, as is newline placement.
Repro:
Start with the following file in both ST3 and vim:
1
2
3
4
#Y
#yj
#y2j
#y3j
Execute each of the command sequences in the comment lines with the cursor on line one, then move to the newline after the comment and press 'p'. In ST3, this produces:
# Y
1
# yj
1
2
# y2j
1
2
# y3j
1
2
3
In vim, this produces:
#Y
1
#yj
1
2
#y2j
1
2
3
#y3j
1
2
3
4
Copied from original issue: sublimehq/sublime_text#394
From @pierrepaullavoie on April 20, 2014 4:48
The default XML.tmLanguage
file will not recognize XML attributes in any of the three following scenarios below.
The language file <key>tagStuff</key>
regular expression could be updated with: [\s](?:([-_a-zA-Z0-9]+)((:)))?([-_.a-zA-Z0-9]+)[\s]*=
to solve those problems.
Original regular expression: (?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9]+)=
.
foo.1="bar"
foo ="bar"
\tfoo="bar"
or
\nfoo="bar"
Copied from original issue: sublimehq/sublime_text#272
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.