5/17/2023 0 Comments Rubymine multiple cursorsOne last press of Tab exits the snippet and selects the text in the loop, so I can start writing my code (caveat: I am not a PHP developer).Īt this point you can see Sublime offering another snippet for echo, which would expand out to an echo statement complete with quotes, then allow me to edit the text in the echo and skip to the end.Ĭircling back around to the first point in your question, you can use Esc at any point to jump out of a snippet and go back to regular editing. Another press of Tab takes me to the third field, where I can specify where the loop ends. Once I'm done changing the name of the variable, I press Tab again to go to the next field, which allows me to easily change the point at which the loop starts. The first field is the name of the control variable for the loop, and all of them are selected so that as I change the name, all of them change at the same time because when there are multiple cursors, the text you type appears at all of them at the same time. The first thing to notice here is that the status line says Field 1 of 4 to tell me that I'm in a snippet and that it contains four fields. As seen here, I enter the text for and then press Tab to expand the snippet out. To answer point #2 in your question first, this is far from useless. In this case, the snippet in question is part of the default functionality of Sublime and is provided by the shipped PHP package. a for loop), you can create a snippet that will generate the bulk of the text for you in one shot, and then allow you to easily customize it as needed. The general idea is that for code that you're likely to type many times (e.g. Although Sublime does indeed support the idea of multiple cursors (which is an incredible time saver and useful as all get out, as we're about to see), what you're actually asking about here is a snippet which in this case happens to also include multiple cursors.
0 Comments
Leave a Reply. |