Sublime Forum

Multiple selection scroll

#1

Hi.

When I use multiple selection (ctrl+alt+up or ctrl+alt+down) and selection comes out of viewport the screen doesn’t scroll to my new selection. So I don’t see where is the end of my selection. I want scrolling to the currently added cursor.

0 Likes

#2

And one more question here. Can I remove a line from selection from top or bottom? If I select more lines than expected, I need to make a new selection.

0 Likes

#3

You mean, you cannot do this below? I think I got some packages installed as:
https://github.com/ehuss/Sublime-Column-Select

0 Likes

#4

Yes, you understand me correctly. This is a good plugin, but has bugs and was updated long ago)

0 Likes

#5

I only see one bug: https://github.com/ehuss/Sublime-Column-Select/issues/3
But it does not seen a bug, it is just the way to use it. What he is requesting actually is a new feature, which should be configurable by a setting, as I like the current behavior.

And I am using It form some months without any problems.
What kinda bugs are you talking about?
Fill a new issues on the plugin issue tracker on github.

0 Likes

#6

Create a new plugin with the relevant item in the Developer submenu and replace the content with the code below and save it:

import sublime_plugin

class KeepMultiCursorsInViewListener(sublime_plugin.EventListener):

    def on_post_text_command(self, view, command_name, args):
        sel = view.sel()
        if len(sel) > 1:
            if 'forward' in args and ((command_name in ('move', 'smart_cursor') and args.get('by') == 'lines') or command_name in ('select_lines')):
                view.show(sel[-1 if args['forward'] else 0], False)
1 Like

Select lines like Komod Edit