Alex Donald
  • Projects
  • Reference
  • About
  • Contact

Copy and paste between two files in VIM

13 January, 2016
CLI • VIM
Source: http://stackoverflow.com/questions/4620672/copy-and-paste-content-from-one-file-to-another-file-in-vi
  1. Open first file in VIM
  2. Split window ctrl-w, s
  3. Open second file :e filename
  4. Yank y and put p text as usual - the buffer is shared between both windows
  5. Navigate between open windows using ctrl-w, UP/DOWN (the up or down keys, not text!)
© 2022 Alex Donald · pgp.txt