How to select multiple selections by line number?

Hi, now I can make multiple selections by split string or regex string, are there any ways that I can make multiple selections by line number?

For example, I want to make multiple selections with the first line, the second line, and the fourth line.

Is it possible?

:select 1.1,1.99999 2.1,2.99999 4.1,4.99999

Or a combination of execute-keys.

3 Likes

Thanks

Another reply, without using Kakoune’s command line (:select ...):

You can select the first line you are interested in, save the selection with Z; then select another line, add it to the saved selection with <a-Z>a; then select another line, add it to the saved selection with <a-Z>a, and so on.

When you are done, restore the whole (multiple) selection with z

1 Like

Thanks, nice way. but I use it in a plugin, : select works perfect for me.