![]() |
![]() emacs
|
![]() |
![]() |
As was mentioned earlier, you can bring up multiple windows in
emacs
. Using windows is the heart of the emacs
editor. We can now display more than one window on the screen at the same
time. This allows you to edit several files at the same time, move data from
one file to the other, or even have emacs
compile a program in
one window and send the results to another window.
To create another window on the display, type C-x 2
. The
number two in the command corresponds to the number of windows you wish to
create. So if you want to close the second window, make sure your cursor is in
the one you want to keep open and use the command C-x 1
. You can
create up to four windows with this command.
The second window you just opened is actually a copy of your first window.
To pull up another file in this window, switch to it and use the find
command, C-x C-f
, or pull one out off the buffer list with
C-x b filename
. If you don't have a mouse to click from
window to window, use the C-x o
command to transfer your cursor
to the other window. Each window has it's own cursor position, but only one,
the active window, actually shows the cursor on the screen.
All editing commands apply to the active window. When closing a window, keep in mind that it is a buffer and is therefore unaffected when you close the window. Your changes will be just as you left them when you pull it up again.
The kill ring is common to all buffers. Because of this, killing and
yanking text from one window to the other is exactly the same procedure,
except now you have to change to the other window before you do the yank
command. Another useful command to remember when copying between two files is
the C-M-v
command, which allows you to scroll the inactive
window. So using this command, you can keep the cursor in the window where you
are editing, while advancing through the other window.
Now that we know to use the most useful option in emacs
,
let's got to what just might be the most useful section, Getting Help in emacs
.
![]() |
![]() emacs
|
![]() |
![]() |