Sublime Forum

Dev Build 3190

#1

Dev build 3190 is now out. A few things that changed include:

  • More tweaks and enhancements to Git and mini_diff functionality
  • Block caret and alpha-blended caret support

For color scheme and theme authors, the docs at https://www.sublimetext.com/docs/3/dev/ have been updated for the Git status badges in the sidebar, the Git information in the status bar and the mini_diff markers in the gutter.

See the full changelog at: https://www.sublimetext.com/3dev.

5 Likes

#2

Question: is the block caret meant to be drawn underneath the line highlight?

It’s drawn like this since the line highlight isn’t transparent (cursor is on the "t" in true):

FWIW, this is using the default Monokai color scheme and Adaptive theme.

0 Likes

#3

This line piques my interest:

Added Edit/Text/Revert Modification menu item

Can you provide some illumination into what it does and the context in which it is available?

I tried modifying a Git-tracked file, and then looking through the right-click menu and searching the Cmd+Shift+P menu for “modif,” but didn’t see anything like the option listed in the Changelog.

0 Likes

#4

Hi @michaelblyons,

When running this command, any selected modifications within the text sheet will be reverted. For example, you can use this command to revert working directory changes for a file tracked within a Git repository.

This can be accessed either through the edit > text > Revert Modification menu item, or through the keybinding ctrl+k, ctrl+z ( super+k, super+z on OSX) by default.

Kind Regards,
- Dylan Johnston
Software Engineer, Sublime HQ

1 Like

#5

@acheronfail thanks for the report, that will be fixed in the next build

3 Likes

#6

It’s a bit confusing that the new revert_modification command only seems to revert a change if the cursor is in the correct position to do so, but it is always enabled even when invoking it doesn’t actually do anything. For example if I add a line to the bottom of the file and put the cursor on the first line, the command is enabled but selecting it does nothing.

0 Likes

#7

To clarify what @OdatNurd said with a screenshot:

THIS_IS_THE_NEW_INSERTED_TEXT is the new text I inserted.

  • To use revert_modification, you have to put your cursor inside the red box region.
  • To revert it with GitGutter's git_gutter_revert_change, you can put you cursor at anywhere inside the yellow box region (the diff hunk).

To make a summary,

  • revert_modification reverts a diff “region” where the cursor is at.
  • GitGutter's git_gutter_revert_change always reverts a whole diff hunk.
0 Likes

#9

The block caret turns into underline inside selection. Is this by design? I would prefer having the same caret inside selection like it’s done in other editors (VSCode, Emacs) Is that possible?

For a good block caret experience it would be nice to have a constant foreground color for a character under the caret. Otherwise it’s hard to get enough contrast with characters in certain colors from your color scheme.

Finally the block caret looks odd when used for non-monospaced fonts like in the Command Pallete or Switch Project window. It would be nice to disable it for pallets.

0 Likes

#10

Linux: Tweaked behavior of up/down when on the first and last lines of a file to better match platform conventions

Is there a way to control this? I kind of prefer the up-then-home behaviour (it’s also what gedit does).

0 Likes

#11

You can set move_to_limit_on_up_down to false to restore the old behavior. See https://github.com/SublimeTextIssues/Core/issues/2415.

2 Likes

#12

How do I hide the “gutter changes” https://i.imgur.com/wGaeB8q.png
Thanks

0 Likes

#13

Via this setting in your preferences (the default is shown here):

    // Indicate modified lines in the gutter
    // - true: Enables modified line indicators on all files
    // - "auto": Enables modified line indicators on tracked files within Git
    // - false: Disables modified line indicators
    "mini_diff": true,
0 Likes

#14

oh I see, thank you, I think I have a file named Default/Preferences.sublime-settings and thats why I wasnt able to see the preferences.

0 Likes

#15

I believe unless strictly necessary this sort of stuff should not go in the Default package, that package is very hard to customize and keep track of changes. I think is good idea if you could just get rid of that Default package.

0 Likes

#16

Since Sublime doesn’t tell you when an override is in place, you always have to be careful when you create one, whether it is the Default package or not. In this case it’s also probably not a good idea to override the default settings; that’s why the left pane in the settings window is usually read-only.

However, for what it’s worth, the main reason I wrote OverrideAudit was to provide an easier facility to find (or be reminded) that you have package overrides in place. One of the things it does is run automatic checks to see if the packaged version of a file is newer than your override, which is an indication that the package has updated and you may be missing changes. In this case that may have given you an early warning that the default file was changing without your realizing it.

0 Likes

#17

I agree we should always pay attention, but that package has so many random stuff that is hard. mini diff setting could have go in the Diff package and duplicate line (which seems that was updated) in a maybe IDK editing buffer package. I have a custom duplicate line command since forever, and it seems that file does not exists anymore in the default package. I tried to search for it (albeith vaguely) and cant find it. I see some organization been done, it would be nice if that could keep moving forward till the default package does not exist anymore.

0 Likes

#18

Funny. What feature you add, people complain. I can remember discussions and requests about GitGutter to support reverting single lines or even single words instead of sometimes very large hunks of changes.

From that point ST now satisfies those requests and immediatelly triggers complains on the other side.

2 Likes

#19

Here is the changes in the official documentation:

3 Likes

#20

The Default/duplicate_line.py plugin was removed in build 3189, which if I recall correctly is because the command is now implemented in the core instead. It’s not explicitly stated but I presume that’s because Merge build 1104 includes this functionality now, which would require the command to be in the core because it doesn’t support plugins yet.

0 Likes

#21

I see, thanks for the clarification. Well, my version of duplicate line, it does that, duplicate lines, in sublime text if you select a portion of just two lines, it does a weird duplication instead of ignoring the selection and duplicating the complete lines. https://streamable.com/eugeo

0 Likes