Emacs-HowToCopyFromOneFileToAnother

From Coder Merlin
Revision as of 23:34, 5 December 2019 by Yarsenius (talk | contribs) (Added formatting)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

How to Copy from One File to Another[edit]

  • Open the target file (the file that you want to copy TO).
  • Split the window in emacs with CTRL-X, 2.
  • Open the source file (the file that you want to copy FROM, with CTRL-X, CTRL-F). Press ENTER and then navigate to the source file. Remember that ".." (two dots) will navigate you UP in the directory hierarchy.
  • Then, copy normally by marking with CTRL-SPACE and then moving to the other end of the region and pressing ALT-W.
  • Now, move to the other window with CTRL-X, o. Move the cursor to where you want to paste the text, and then press CTRL-Y.
  • After you've completed the copy, you can close all other windows with CTRL-X, 1.