Is there a command to select everything between the range of cursors in sublime?

My circumstance:

I am working with Fortran. Sometimes I want to select everything that is inside a block of code. I find it easy to select the start / end elements of the block because it all looks like this:

SUBROUTINE FOO(BAR)
IF (BAR .GT. 1) THEN
    //DO SOMETHING
ENDIF
RETURN
END SUBROUTINE FOO

      

Move the cursor to SUBROUTINE

, Ctrl+D

double- click , do. Both instances of the keyword are SUBROUTINE

highlighted.

But now I want to select everything between keywords SUBROUTINE

. I want a choice that includes everything from the beginning of the first SUBROUTINE

to the end of the second SUBROUTINE

. I prefer this to be done in a language agnostic because I can imagine that similar situations could arise in other contexts, and I don't want to bother building muscle memory for something that only works in Fortran.

Is there a command in sublime to select all text that occurs between the start and end positions of the multi-course selection?

+3


source to share


1 answer


There is a group of sublime commands that bring this behavior closer. They are displayed using the CTRL+ combinations K:

  • set_mark, CTRL+ K, CTRL+Space
  • select_to_mark, CTRL+ K, CTRL+A
  • delete_to_mark, CTRL+ K, CTRL+W


Find the first result, call set_mark, find the second, call select_to_mark.

+4


source







All Articles