Sublime Forum

Scroll multiple columns (like BBEdit synchro scroll)?

#1

It seems like ST2 should do this. I just haven’t hit upon the correct keystroke combo. It would be really great if it could do this across multiple columns, but just 2 would be great. Thanks for any help

0 Likes

#2

You could upvote this: sublimetext.userecho.com/topic/9 … r-cmd-key/

0 Likes

#3

This is a very basic plugin that synchronized cursor movements (triggered by keyboard only, not mouse scrolling, look at the keybindings) across all groups.
It may be useful…

[code]import sublime, sublime_plugin

class SynchViewCommand(sublime_plugin.WindowCommand):
def run(self, cmd="", **kwargs):
if cmd:
grpcount = self.window.num_groups()
if grpcount > 1:
for grp in range(grpcount):
synchview = self.window.active_view_in_group(grp)
if synchview:
synchview.run_command(cmd, kwargs)[/code]

{ "keys": "shift+alt+up"], "command": "synch_view", "args": {"cmd": "move", "by": "lines", "forward": false} }, { "keys": "shift+alt+down"], "command": "synch_view", "args": {"cmd": "move", "by": "lines", "forward": true} }, { "keys": "shift+alt+pageup"], "command": "synch_view", "args": {"cmd": "move", "by": "pages", "forward": false} }, { "keys": "shift+alt+pagedown"], "command": "synch_view", "args": {"cmd": "move", "by": "pages", "forward": true} }, { "keys": "ctrl+shift+alt+home"], "command": "synch_view", "args": {"cmd": "move_to", "to": "bof", "extend": false} }, { "keys": "ctrl+shift+alt+end"], "command": "synch_view", "args": {"cmd": "move_to", "to": "eof", "extend": false} }

1 Like

#4

It’s not working for me (installed from sublime package: github.com/atbell/SublimeSynchroScroll)

I’m on a mac, I tried to add the keys to my user file but it didn’t work neither.
I’ll try later on my pc.

Maybe I’m doing it wrong tho.

0 Likes

#5

Didn’t try it but as it’s the same code as mine that work fine, it must work.

Try typing this 2 lines in the console to activate logging:

sublime.log_input(True) sublime.log_commands(True)
And try again.
The console show you the keys you press (from ST2 view) and the command that is executed.
Maybe the keybindings doesn’t work on OSX.

Type the same lines with a False argument to deactivate the logging.

0 Likes

#6

I know this is an old topic but there’s this plugin that does what you describe.

https://packagecontrol.io/packages/Sync%20View%20Scroll

0 Likes