vi - How do you move the cursor to the end of a string in Vim? -


let's i'm editing line of javascript in vim:

var opener = 'as gregor samsa awoke 1 morning uneasy dreams found himself transformed in bed gigantic insect'; 

if cursor on g in gregor, how move t in insect?

i'm not talking moving end of line. i'm talking moving end of javascript string encapsulated in single quotation marks. (i know can /'h, i'm wondering if there's more generic command—maybe %.)

there's vi'<esc>, goes visual mode selection comprising interior of current string, , cursor @ end of selection — leaves visual mode.

i'm not sure if there's better way.


Comments