Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the point of Incremental Find in Sublime Text?

Tags:

At the end of this tutorial: https://www.youtube.com/watch?v=ICxMZGLKEbU the author makes it look like the Incremental Find (CTRL+I) is somehow a quicker way to get one's cursor from anywhere in the edited document to some specified place than when using the Regular Find (CTR+F), but I fail to see any difference in the number of steps required. You hit the keys, type a word to which you want to get to, and then either press ENTER (Incremental) or ESCAPE (Regular).

Also, I don't quite see why it's called incremental.

like image 378
ThreefoldBurly Avatar asked Apr 08 '15 14:04

ThreefoldBurly


People also ask

What is diff hunk Sublime Text?

When right-clicking on a modified region of a file, a menu entry Show Diff Hunk will be available. This menu item will display the previous content inline beneath the current content. Right-clicking again will show a menu item Hide Diff Hunk to hide the inline diff.


1 Answers

There is a slight difference in between the two functions. With Find (CtrlF), you type in what you're looking for, and each time you hit Enter the next occurrence of the pattern is shown, but it is not a selection in that you can begin typing right away - you need to hit Esc first, and the highlighting is changed to a selection.

With Incremental Find (CtrlI), on the other hand, you start typing in your pattern, and when you hit Enter, the Find highlighting is turned into a selection, the dialog box disappears, and you are immediately able to begin editing the selection. This saves a grand total of one keystroke over the Find method, but has the disadvantage that, unless you hit F3 (Find Next), you are only editing the first instance of the pattern found.

It's kind of a subtle difference, and each one can be used in different situations. Play around with them both and see how each fits into your workflow.

like image 52
MattDMo Avatar answered Sep 23 '22 19:09

MattDMo