Sublime Forum

Dev Build 3154

#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

#37

With the new Command Palette if the cursor is not already on the far right of the entered text, e.g. the user has moved the cursor left to correct a typo letter, then the next time the down key is pressed the cursor jumps to the end of the entered text instead of scrolling down one item in the list of commands. Note that the opposite does not happen when pressing the up key. I suspected that this might be related to the move_to_limit_on_up_down setting, but it happens even when that setting is false.

2 Likes

Up/Down Arrow keys in command list
#38

Same with Materialize theme:

Also with Material theme:

0 Likes

#39

Confirm this behavior. Would like to see up+down to select the prev/next item in the list immediately, too.

0 Likes

#40

Ayu Theme problem with this new version…

0 Likes

#41

Just wanted to show some non-arithmetic use of Arithmetic :slight_smile: I’ve used the Inline Python plugin for this for a long time and having it with a result preview in the command palette is pretty nice, thank you. I would suggest calling the command Evaluate if it will always be able to do this generic python type of eval

I often need to move small groups of bits to weird offsets for hardware development (registers with specific bit fields) and being able to type a binary literal is often much nicer than figuring out how it looks in hex.

7 Likes

#42

I assume it’s already been noticed elsewhere, but I’m seeing the same behaviour with an unmodified Adaptive theme (although Default works); the preview seems to always render in black text, so in Adaptive with the Monokai theme, it’s essentially black on dark gray and unreadable.

0 Likes

#43

Quick note that the arithmetic command is also available in a similar fashion via Insert Nums, which uses a custom syntax for inserting a sequence of numbers, supporting piping of the currently selected text and stop expressions (allows to generate exactly n lines, for example).

3 Likes

#44

hi, guys , I sincerely ask for the Simple Chinese input method in Ubuntu gnome fcitx, all Chinese Linux users are waiting for this feature, 3rd party solution is not perfect for current situation, Can we propose this feature ahead of your agenda?

0 Likes