Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change/yank the string between two blank spaces?

Tags:

vim

How to change/yank the string between two blank spaces? I have tried ci[hit space bar] but it doesn't work..

like image 751
ziiweb Avatar asked Dec 11 '14 13:12

ziiweb


2 Answers

Use ciW (change inner WORD)

From :h WORD :

A WORD consists of a sequence of non-blank characters, separated with white
space.  An empty line is also considered to be a WORD.          
like image 50
Marth Avatar answered Nov 02 '22 02:11

Marth


It is w for word, not , i.e. change inner word ciw or yank inner word yiw, respectively.

Update for the given example, let | denote the carret

id="remember_me" name="_r|emember_me" value="on"

Hit ciW

id="remember_me" | value="on"
like image 3
buergi Avatar answered Nov 02 '22 03:11

buergi