Git Product home page Git Product logo

defaultpackages's People

Contributors

fichtefoll avatar jbrooksuk avatar pwr22 avatar titobouzout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pwr22 jameslinus

defaultpackages's Issues

Wrong indentation for Javascript/JSON

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

Bug Description:

  • Wrong indentation for Javascript/JSON

How to reproduce:

  • Open Javascript/JSON file (with proper indentation)
  • Ctrl + Shift + P: Reindent Lines
  • Indentation is wrong

Before
before

After
after

Copied from original issue: sublimehq/sublime_text#234

[spell check] markdown parsing ignores last character before closing bracket

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.

image

sublime-text_issues_example-context-menu

Copied from original issue: sublimehq/sublime_text#585

C++ Syntax highlighting lost in long files

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

Quote Highlighting Carried To EOF in Objective-C

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

Goto Symbol problem with pascal syntax

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;

gotosymbolworking
gotosymbolproblem

Copied from original issue: sublimehq/sublime_text#492

Renew Ruby on Rails snippets

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

Missing function `boolval` from PHP built-in functions list

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

List more symbols than expected when using "goto symbol" for C language in ST3

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

The default syntax highlighting for C ++ parsing error occurs

From @ForceGROUP on September 21, 2014 3:58

When I use using namespace xxx; several consecutive namespace references become invalid, as shown below
Sublime

C++11 Parse:
Sublime

And if there is such a code

#ifdef __cplusplus
extern "C" {
#endif
int foo();
#ifdef __cplusplus
}
#endif

😂 ifdef and endif Unable to match the correct

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

html highlighting with numbers in attribute names

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

Vintage yank inconsistencies with vim

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

Bash highlighting glitches with weird combination of curly braces

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.

screen shot 2014-10-13 at 11 00 58 am

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

XML Syntax Highlighting doesn't work in some scenarios

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]+)=.

Attribute name includes a period
foo.1="bar"
If you have a space after the attribute name:
foo ="bar"
If the element names previous character is not a space character:
\tfoo="bar"

or

\nfoo="bar"

Copied from original issue: sublimehq/sublime_text#272

Incorrect syntax highlighting for yaml with quoted colon

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:

screen shot 2014-03-21 at 11 15 02

Expected behaviour: correct syntax highlighting. I assume that would look like this, note the missing colon:

screen shot 2014-03-21 at 11 19 27

Copied from original issue: sublimehq/sublime_text#266

Comments do not work in AppleScript Syntax

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

Python syntax highlighting error when `CREATE` keyword present

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

sublime text syntax highlighting

Expected behavior would be for %s to display in purple in all cases.

Copied from original issue: sublimehq/sublime_text#269

C++ enum class Comments Not Detected

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
};

screenshot from 2014-07-01 22 09 33

Copied from original issue: sublimehq/sublime_text#361

Javascript commenting highlighting incorrect

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

Instantiating Scala classes without parameterization causes highlighting bug

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

JavaScript RegEx highlighting is wrong for slashes within sets/ranges

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/;

2014-11-26_22 56 58

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

$ in JavaScript is matched as keyword.operator (and generally incorrectly)

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;

2014-08-21_00 23 48

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

Bash syntax highlighting: keywords match when next to hyphen or slash

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):
image

image

After the keyword match, all code that is normally white is highlighted yellow instead.

Copied from original issue: sublimehq/sublime_text#590

Syntax highlighting bug with quotes embedded in Python string

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

Syntax colorer problem after #define

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.

screen shot 2014-06-20 at 12 56 59

Copied from original issue: sublimehq/sublime_text#348

Setting default value of typehinted argument to array using short array syntax in PHP

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

Perl regular expression highlighting broken

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

Bug Description:

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:

screen shot 2014-10-08 at 5 26 30 pm

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

How to reproduce:

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

javascrypt syntax highlighting problem

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:
st_highlighting_bug
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

border-?-?-radius not highlighted correctly in CSS

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

C++ Symbol generation Bug with preprocessors

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.