if you have a unique letter, as in this case ("t"), a quicker way is "dtt" (delete till "t") or "ctt" (change till "t"). in case of non unique character it takes a count but that scales badly for me, and i use /.
Also I like to use "f" for find followed by the character you wish to move cursor to the character you desire to end up on the present line. (ex. "fl" jumps to the first "l" of the line.)
(I personally think of "f" as "find", not "first")
What beautiful chords at this here fireside chat.
I think that’s right anyway, no vim terminal at hand to check myself.
You can type "d2;" however.
q:
.,/This is a line of text/- d
. is the current line. /This is a line of text/ is the line that contains it and the - after the regex refers to the line immediately above. You could use _ to refer to the line immediately after, or -x or +x where x refers to the number of lines above or below the line that the regex matched. :1+2,$-2 d
1 is the address of the first line in the file and $ is the address of the last line in the file. Add 2 to the first to get the third line and subtract 2 from the last to get the third to last line. The d command deletes the lines in the address range.You can also address lines with a regex, like I did in the example in my previous comment. You can even use regex addressing for ranges. If you wanted to delete a python method definition in between other method definitions, you could do something like:
:/def method_to_delete/,/def/- d
which would start the range with the line that contains def method_to_delete and delete lines up to the line before the next line that contains the def keyword that starts the next method definition.You've changed my life