Sublime Forum

How to automatically scroll build output to the top?


When you have a billion errors, the bottom ones usually result from the top ones, so you only need to resolve those. But the output window is always scrolled to the very bottom, which is not very helpful, since I have to grab my mouse every time I Ctrl+B. Is there a setting to make it scroll to the top automatically?

1 Like


You can easily create a plugin to scroll to the top. Select Tools > Developer > New Plugin… and paste:

import sublime_plugin

class BuildScollTopCommand(sublime_plugin.WindowCommand):
    def run(self):
        v = self.window.find_output_panel("exec")
        if not v:
        v.run_command("move_to", {"to": "bof"})

Then add a keybinding

        "keys": ["ctrl+k", "ctrl+home"],
        "command": "build_scoll_top",

Now just press the keybinding to scroll to the top. Not sure how to do it automatically, because I don’t know how to listen to the finish of the build.



Packages/Default/ runs the append command with the argument "scroll_to_end": true - not that I’d advocate such a thing, but as an alternative to listening to the finish of the build, one could change this argument’s value to false and presumably it would never scroll



@kingkeith Yup that worked! Thanks @r-stein too, but the other answer makes it automatic

1 Like


@kingkeith PS: How do you know such a thing?

1 Like


I’ve explored the Default packages quite a lot :slight_smile:

as you are overriding a file in the Default package, I highly recommend installing OverrideAudit so that you don’t forget to undo/redo your change when the next ST build is released, otherwise you could experience odd behavior due to having an outdated plugin file :slight_smile:



I am using PackageResourceViewer, which to my knowledge saves the changes in the User folder, so it shouldn’t be a problem.

1 Like


Unless you specifically use save as to save a file that you’ve opened with PackageResourceViewer as a different name, the files that it opens will save as an override (i.e. within a folder named after the package, not your User folder).



Does this still work for you guys?

These days, changing 'scroll_to_end': True to 'scroll_to_end': False in does not seem to prevent the Build Results panel from scrolling all the way to the bottom.

It does however prevent it from scrolling horizontally to the right if there is a long line and "word_wrap": false is set in the Build System. But that’s not nearly as useful as preventing vertical scrolling!