Sublime Forum

Dev Build 3194

#1

We’ve just released dev build 3194 with a handful of stability improvements and bug fixes. https://www.sublimetext.com/3dev

If you haven’t already, please report any issues you’ve seen pop up during this dev cycle at https://github.com/SublimeTextIssues/Core/issues.

4 Likes

pinned globally #2
0 Likes

#3

@wbond Is there a shortcut for switching between native tabs?

0 Likes

#4

BTW. I find ‘native tabs’ naming confusing. The fact that those are native seems just like an implementation detail. I think those should be called after what function they fulfil and that is project switching so ‘project tabs’ maybe?

0 Likes

#5

One more thing native-tabs-related:

With tabs showing full project path first and then project name, project name gets cut off often and I would argue that project name is more relevant part of the title and easier to associate with the content of the tab. So it would be better to have it either before path or have smart ellipsis in the middle that would preserve full project title.

0 Likes

#6

No, the tab-related shortcuts are used by regular file tabs. I don’t have a strong opinion about this, but it seems that other apps like Sublime Text tend to not have these bound to shortcuts. Perhaps this is because there isn’t an obvious choice?

Unfortunately they are really “windows grouped into a single window via tabs”, so they aren’t specifically project-related (you can actually get the changelog window into a tab). In one sense, the only reason they exist is because Apple built this functionality into all apps unless you opt-out. We’ve just made it so you have proper control of them, whereas before the OS would create them, but there were a bunch of funky edge cases. Additionally, this is terminology used by other editors.

0 Likes

#7

I’m not sure what „native tabs” are, but since they are mac-related, I assume is about the app window (one app can have multiple windows, that are not shown on alt+tab).

If that’s the case, the shortcut is built in the OS: CMD+` (although it might be in conflict with ST console?).

Related:

0 Likes

#8

Unfortunately that only works for full windows, not a window-in-a-tab.

0 Likes

#9

@wbond There is one bug I’ve been meaning to report. view.extract_scope returns a range for scopes that is off by 1 if performed on a region that is on the last line of a file without a newline. If you add a new line, it behaves as expected. I’ll try to work up a case in the issues.

0 Likes

#10

Is this a recent change?

0 Likes

#11

I’m not sure when it appeared, only that I received a bug recently on HexViewer plugin that brought this issue to my attention.

Interestingly, it is not always reproducible, but I was able to force it with this. Don’t have a newline at the end of the last line:

00000000:  2320 4120 636f 6d6d 656e 740d 0a23 206d 6f72 6520 636f 6d6d  :# A comment..# more comm
00000018:  656e 740d 0a76 6172 203d 2022 7374 7269 6e67 2220 2320 636f  :ent..var = "string" # co
00000030:  6d6d 656e 740d 0a                                            :mment..

Using this sublime-syntax file which (for this reproduction) I’ll place in Packages/User/test.sublime-syntax:

%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Hex
file_extensions: ['hex']
scope: source.hex
contexts:
  main:
    - match: '^([a-fA-F\d]{8}\:)([\s]{2})'
      captures:
        1: keyword.address.hex
        2: dump.buffer-start.hex
      push:
        - meta_scope: dump.hex
        - match: '[\s]{2}(\:)'
          captures:
            0: dump.buffer-end.hex
            1: keyword.ascii-start.hex
          pop: true
        - match: '[\da-fA-F]{1}'
          captures:
            0: raw.nibble.upper.hex
          push:
            - meta_scope: raw.byte.hex
            - match: '[\da-fA-F]{1}'
              captures:
                0: raw.nibble.lower.hex
              pop: true
            - match: '[\w\W]'
              scope: invalid.illegal.expected-nibble.hex
        - match: '[\s]{1}'
          scope: raw.punctuation.hex
        - match: '[\w\W]{1}\s*'
          scope: invalid.illegal.character.hex
    - match: '^[\w\W]*$'
      scope: invalid.malformed-line.hex
    - match: '[\w\W]*$'
      scope: comment.ascii.hex

Then I set the syntax:

>>> view = sublime.active_window().active_view()
>>> view.set_syntax('Packages/User/test.sublime-syntax')

This gives me a view that looks like this (notice the last comment mment..., that will be our target):

So now we grab the scope extent:

>>> view.substr(view.extract_scope(270))
':mment..'

Notice it grabs the : for some reason.

Now if I add a newline:

>>> view.substr(view.extract_scope(270))
'mment..\n'

Maybe I’m missing something, but this seems like a bug.

0 Likes

#12

I’ve formally created a bug for this:

3 Likes

#13

I see more work is being done around git support, the gutter status display, and providing diffs. Is this intended to replace the functionality in the current git gutter package?

The one feature I like about git gutter package is the line display; at the end of each line of code so you can see author and last modification date etc (like git blame)

I think if this was supported natively in Sublime I would need one less external package and one less external package is always a good thing.

Also is it possible to change the gutter display from a line to symbols? I much prefer symbols that a block of colour.

0 Likes

#14

when sublime text warns you of an update it offers you the option to download now. this does nothing at all, not even open the web browser (for the past few released).
running gentoo linux

0 Likes