Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's no good way to do it, unfortunatly. You need to yank the contents of the line without yanking the entire line qua line. Now, if 'l' were a text object for 'line' then there would be an obvious 'yil' for just getting the inner stuff, but since there isn't you'll have to do 0y$ to go to the start of the line and yank until the end of the line. That'll store the line contents instead of the line itself, so p will do what you want it to.


I have exactly this mapping defined in my .vimrc ...

  " 'Inside-line' operator-pending-mode mapping
  onoremap <silent> il :<C-U>normal! ^v$h<CR>
  onoremap <silent> iL :<C-U>normal! 0v$h<CR>


So it's

1. 0y$p

and

2. o<ESC>p




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

Search: