Skip to main content
deleted 187 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 239

In vim I use yy and p all the time to yank and paste lines. However, if I want to replace one line multiple places in the file, I can't use yy p dd p because the dd deletes the line to the clipboard / register. While I should probably know how to use registers better, i feel like there is probably a way to p that replaces the current line.

Google wasn't much help in finding anything, and the VIM tutorials I found did not cover this. I just ordered a book from amazon but I hope someone can let me know before it gets here ;)

In vim I use yy and p all the time to yank and paste lines. However, if I want to replace one line multiple places in the file, I can't use yy p dd p because the dd deletes the line to the clipboard / register. While I should probably know how to use registers better, i feel like there is probably a way to p that replaces the current line.

Google wasn't much help in finding anything, and the VIM tutorials I found did not cover this. I just ordered a book from amazon but I hope someone can let me know before it gets here ;)

In vim I use yy and p all the time to yank and paste lines. However, if I want to replace one line multiple places in the file, I can't use yy p dd p because the dd deletes the line to the clipboard / register. While I should probably know how to use registers better, i feel like there is probably a way to p that replaces the current line.

edited tags
Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k
deleted 4 characters in body
Source Link
cwd
  • 47.1k
  • 73
  • 155
  • 172

In vim I use yy and ppp all the time to yank and paste lines. However, if I want to replace one line multiple places in the file, I can't use yy ppp dd ppp because the dd deletes the line to the clipboard / register. While I should probably know how to use registers better, i feel like there is probably a way to ppp that replaces the current line.

Google wasn't much help in finding anything, and the VIM tutorials I found did not cover this. I just ordered a book from amazon but I hope someone can let me know before it gets here ;)

In vim I use yy and pp all the time to yank and paste lines. However, if I want to replace one line multiple places in the file, I can't use yy pp dd pp because the dd deletes the line to the clipboard / register. While I should probably know how to use registers better, i feel like there is probably a way to pp that replaces the current line.

Google wasn't much help in finding anything, and the VIM tutorials I found did not cover this. I just ordered a book from amazon but I hope someone can let me know before it gets here ;)

In vim I use yy and p all the time to yank and paste lines. However, if I want to replace one line multiple places in the file, I can't use yy p dd p because the dd deletes the line to the clipboard / register. While I should probably know how to use registers better, i feel like there is probably a way to p that replaces the current line.

Google wasn't much help in finding anything, and the VIM tutorials I found did not cover this. I just ordered a book from amazon but I hope someone can let me know before it gets here ;)

Tweeted twitter.com/#!/StackUnix/status/146324376055316480
Source Link
cwd
  • 47.1k
  • 73
  • 155
  • 172
Loading