Comment

Comment by Izkata

Others have mentioned relativenumber, but for horizontal I just use search. For example:

   This is a line of text.
If the cursor is on "is" and you want to delete everything before "text", this is what I do:

   d/text<enter>
Any movement works for these actions, even searching to "select" everything between the cursor and the target. Often I'll use visual mode to get a quick confirmation before deleting it:

   v/text<enter>h
   (check selection is what I want)
   d
The visual mode one isn't exactly the same because one additional character, the first "t" in "text", is in the visual selection area, hence the "h" to go back one.
parent Izkata 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton