Sublime Forum

Dev Build 3154

#17

On build 3153 I can open the command palette with Ctrl+Shift+P and it close it with the same command without erasing the input text:

Now on build 3154, if I do the same, the output got cleaned out as when I press the escape key as described on the issue:

  1. https://github.com/SublimeTextIssues/Core/issues/1814 Command palette cleans the last command on escape key press

0 Likes

#18

Re: Bug: Command Palette grows to 85% width of window

The same problem persists with a clean profile, i.e. the config directory temporarily renamed to allow ST to create a factory-default profile. Here’s a screenshot of that with a maximized ST window. HTH.

0 Likes

#19

I can second the fact that the command pallet grows to 85%.
Windows 8.1

1 Like

#20

It might be helpful if you were to edit your post to state your OS.

So far confirmed on Linux and Windows.

0 Likes

#21

I can confirm the command pallete grows as well on OSX 10.12.6

Another bug I’ve found: My HTML and PHP syntax highlighting suddenly stopped working:

error: Error loading syntax file "Packages/HTML/HTML.sublime-syntax": no such target scope:source.css#rule-list-body

error: Error loading syntax file "Packages/PHP/PHP.sublime-syntax": no such target scope:source.css#rule-list-body

Any clues ?

0 Likes

#22

This “issue” was discussed several times recently. It is caused by disabling the default CSS.sublime-syntax which was proposed by the CSS3 author. HTML and PHP rely on the default CSS syntax.

See: https://github.com/y0ssar1an/CSS3/issues/85

1 Like

#23

but then those scopes should be part of the guidelines and included in the default color schemes

It’s up to the core devs, but would like to see that, too.

Given the thousands of legacy color schemes …

New sublime-color-scheme format will change a lot anyway, including easier patches for plugin specific features without duplicating whole color-scheme files.

see region.colorish as a reliable fallback

The region.colorish would still need to be supported by plugins, which would need to add a couple of scopes instead of a single one, then to support region.colorish next to markup.. Don’t think it would improve anything but just move the requirement of defining a couple of scopes from color-schemes to plugins.

1 Like

#24

I agree with this sentiment, which is why you can (probably?) specify the scope to be used in e.g. add_region and syntaxes as region.redish markup.error and if the scheme doesn’t define a color for markup.error it falls back to region.redish. I do not know whether these are active for syntax definitions however.

1 Like

#25

@monokai ,Even monokai theme is broken.

0 Likes

#26

Cool feature. The new command pallet adds a lot of value.

Based on the provided examples a Preferences command could new be added, which suggests the available settings files. This way all package settings were accessible without the need for each package to provide its own “edit_settings” command definitions.

Here is a simple example of a modified settings.py to achieve it.

Default/Default.sublime-commands

    { "caption": "Preferences", "command": "edit_settings" },

Default/settings.py

import re
import os.path

import sublime
import sublime_plugin


class BaseFileInputHandler(sublime_plugin.ListInputHandler):

    PACKAGES = "${packages}/"

    # The pattern to extract the path and basename of a file.
    SETTINGS_RE = re.compile(
        r"(?i)Packages/(.+/)(.+?)(?: \(.+\))?(\.sublime-settings)")

    def name(self):
        """Return argument name."""
        return "base_file"

    def placeholder(self):
        return "Settings File"

    def preview(self, value):
        """Show the full path in the preview area"""
        if value:
            return sublime.Html("<b>File:</b> " + value[len(self.PACKAGES):])
        else:
            return None

    def list_items(self):
        """Create a list of unique available settings files."""
        names = []
        items = []
        for f in sublime.find_resources('*.sublime-settings'):
            path, name, ext = self.SETTINGS_RE.match(f).groups()
            if name not in names:
                names.append(name)
                items.append((name, "".join((self.PACKAGES, path, name, ext))))
        return items

class EditSettingsCommand(sublime_plugin.ApplicationCommand):

    def input(self, args):
        if "base_file" not in args:
            return BaseFileInputHandler()
        else:
            return None

    def run(self, base_file, user_file=None, default="{\n\t$0\n}"):
      ... # the rest is unchanged
2 Likes

#27

Also, is this correct?

I was expecting 16

0 Likes

#28

You should use double start ** for exponentiation:

0 Likes

#29

Now the command palette is using sublime.KEEP_OPEN_ON_FOCUS_LOST, but on the last build 3153 it was not the behavior.

0 Likes

#30

I’ve been commenting on this very thing here: .sublime-color-scheme and region.colorish

0 Likes

#31

I think this is broken. This is for Vue.js. I have the Vue plugin installed. Latest version of ST 3154. Theme is Monokai (the one that comes installed with ST). I believe this was working in the previous build.

I tried testing it with Mariana and Breakers and I come across the same result.

What would you suggest ?

Thanks

1 Like

#32

See this issue.

It looks like the Vue syntax, which was never updated to the sublime-syntax system, is embedding the JavaScript syntax in a very brittle way. This left it vulnerable to changes in the internal implementation of that syntax. The Vue syntax needs to be updated to include the JavaScript syntax in a more robust manner. This will fix this bug and forestall any future problems that might otherwise result from changes to the JavaScript syntax.

Alternatively, you can put a semicolon after the closing brace. It’s technically mandatory, although the automatic semicolon insertion algorithm will muddle through regardless.

2 Likes

Vue Syntax highlight
#33

@ThomSmith It works after adding a semicolon. Thank you, Sir.
I have a request please (I am not sure if you have already done so and if you have some spare free time ), can you please help fix this case in the vue component package , please ?

I would fore ever be beholden.

Thanks

0 Likes

#34

php & blade hl is gone

0 Likes

#35

@wbond @jps

I’ve tested 3154. There is a regression, – content_margin of overlay_control doesn’t work.

Steps to reproduce:

    {
        "class": "overlay_control",
        "layer0.tint": [255, 0, 0],
        "layer0.opacity": 1.0,
        "content_margin": [50, 10]
    },

Also it would be great to have max width option for command palette.

4 Likes

#36

[quote=“addons_zz, post:28, topic:33286, full:true”]
You should use double star ** for exponentiation[/quote]
@gj1118

Furthering this: With the Arithmetic command, Python’s math class module’s constants and functions can be accessed using the math. prefix, e.g. math.sqrt(81), math.pi. Note: ST3 uses Python v. 3.3 so functions added to the math module later than that will not work, e.g. math.gcd(a, b).

1 Like