simonra
simonra

Reputation: 285

How to select words from inside current word and backwards in vim

I've had some fun learning vim, but have encountered a problem. While it's fairly straightforward to select from inside the current word and forward (v + iw + w +w + ...), and backwards (v + b + b + ... or v + ge + ge + ...). (This question describes that process quite well: In Vim/Vi, how do you move the cursor to the end of the previous word? ). I know one solution is to move the marker to the end of the word before beginning the selection, but it seems less elegant than just including the entire word the cursor is in in the selection (like you can with iw when going forward (I think what I'm asking for is a sort of ib or modifier key to make w cycle backwards without making custom aliases)).

Is it possible or am I just being unreasonable? Sorry for the messy formatting.

Upvotes: 4

Views: 1314

Answers (1)

Boris Brodski
Boris Brodski

Reputation: 8695

You are looking for viwo + b + b + b

Upvotes: 9

Related Questions