keyworks
keyworks

Reputation: 345

How to delete until end of delimiter?

In vim, I know that typing di' will delete text inclosed by a single apostrophe,

'hello world' => <di'> => ''

but lets say I want to delete until the end of the apostrophe?

For example:

'hello world' => <delete command with cursor on w> => 'hello '

Is there an obvious way to do this?

Upvotes: 7

Views: 1861

Answers (1)

gpojd
gpojd

Reputation: 23085

I think this is what you want:

dt'

Use the mnemonic "delete till '" to remember. dT' will delete backwards leaving you with "world". There is also df' that will delete everything, including the apostrophe. More information on find and till is available here.

Upvotes: 14

Related Questions