Friday, September 11, 2015

How to copy text in vi (vim) and paste it in search mode without using the mouse.



  1. Select the text that you want to copy by pressing v or Ctrl + v and then moving the cursor.
  2. Press y to copy the selected text.
  3. Press / to go to the search mode.
  4. Press Ctrl + r and then " 
  5. This will paste the text that you just copied. You can press Enter to start the search now.