Hi !
First of all, thanks a lot for Sublime Text, it’s awesome
I need to select a ligne every three line (select line 1, line 4, line 7, etc…). How can I do that ?
Ythio.
Hi !
First of all, thanks a lot for Sublime Text, it’s awesome
I need to select a ligne every three line (select line 1, line 4, line 7, etc…). How can I do that ?
Ythio.
There are a variety of ways. One way is to use Find with a regular expression like “.\n.\n.*\n”, use Find All, then press left arrow to convert to single selection cursors.
Alternatively you can record a macro.
Open the console and type:
view.sel().add_all([sublime.Region(view.text_point(x, 0)) for x in range(0, view.rowcol(view.size())[0]+1, 3)])
If you need this feature regularly, create a plugin.
sapphirehamster solution is smarter and good enough for sporadic use (you can simplify the RE a little “(.*\n){3}”).