Hacker News new | past | comments | ask | show | jobs | submit login

In Vim I would do something like this:

  /fo<RET>vweobby

  /fo <RET> I use search to get me close to where I want to be
  v         I enter visual mode, I want to see what I'm selecting
  we        I select the words 'font rendering'
  o         I realize I want to extend my selection to the left
  bb        select 'would be to the left'
  y         yank the selected text
I didn't need to count anything and the in-progress selection was visible the whole time allowing me to make adjustments to it.

If you don't know all the Vim motion keys yet and don't like counting then you could also do it like this that requires very minimal Vim knowledge:

  /fo<RET><C-left><C-left>v<C-right><C-right><C-right><C-right><left>y
How would you extend the selection to the left with the mouse without loosing the already existing selection?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: