version 1.12, 2013/02/10 15:38:18 |
version 1.13, 2013/05/17 20:35:49 |
|
|
often. When you save a file, mg saves a backup of the file with a tilde (~) |
often. When you save a file, mg saves a backup of the file with a tilde (~) |
character at the end. |
character at the end. |
|
|
Windows |
Working with Buffers and Windows |
------- |
-------------------------------- |
|
|
The mg editor can support several windows at the same time, each one displaying |
Once a file is loaded into mg, it is often referred to as a buffer. |
different text. To split a screen into two horizontal windows use C-x 2 to do |
|
this. To return to one window, use C-x 1 to close the other windows and only |
|
keep the current window. |
|
|
|
|
The mg editor is capable of editing multiple buffers at the same time. When you |
|
open a second file with C-x C-f, the first buffer is still being edited by mg. |
|
|
|
Both buffers can be viewed simultaneously because mg can support several windows |
|
at the same time, each one displaying different text. To split a screen into two |
|
horizontal windows use C-x 2. To return to one window, use C-x 1 to close the |
|
other windows and only keep the current window. |
|
|
>> Use C-x 2 to split the screen into two windows. |
>> Use C-x 2 to split the screen into two windows. |
|
|
>> Use C-x o to move from one window to the other. You can scroll up and down |
>> Use C-x o to move from one window to the other. You can scroll up and down |
|
|
|
|
>> Use C-x 1 to restore back to one window. |
>> Use C-x 1 to restore back to one window. |
|
|
Buffers |
|
------- |
|
|
|
The mg editor is capable of editing multiple files at the same time. When you |
|
open a second file with C-x C-f, the first file is still being edited by mg. |
|
You can list all the buffers that are opened by mg by typing C-x C-b. The |
You can list all the buffers that are opened by mg by typing C-x C-b. The |
screen should divide into two and the top window will list the buffers that |
screen should divide into two and the top window will list the buffers that |
are currently open. Use C-x o to switch to the top window (we already learned |
are currently open. Use C-x o to switch to the top window, then use the arrow |
this key combination above in the Windows section) and then use the arrow keys |
keys to move to the buffer you wish to switch to, and then type the Enter key to |
to move to the buffer you wish to switch to and then type the Enter key to |
|
select that buffer. Then use C-x 1 to switch back to only one window. |
select that buffer. Then use C-x 1 to switch back to only one window. |
|
|
You may also move back to the last opened buffer by using C-x b to toggle back |
You may also move back to the last opened buffer by using C-x b to toggle back |
|
|
|
|
>> Use C-x C-f to open a new file |
>> Use C-x C-f to open a new file |
>> Use C-x b to switch back and forth between that buffer and this one. |
>> Use C-x b to switch back and forth between that buffer and this one. |
|
|
To edit files in multiple windows, use C-x 2 to split the screen into two |
|
windows. Then use C-x C-f to open a new file in one of the two windows. You |
|
can then switch between the two windows using C-x o. You can switch between |
|
buffers in any window using C-x b. To go back to one window, use C-x 1. |
|
|
|
To kill any buffer, use C-x k. You will be prompted for the buffer to kill. |
To kill any buffer, use C-x k. You will be prompted for the buffer to kill. |
By default, the current buffer is selected as the one to kill. You may also |
By default, the current buffer is selected as the one to kill. You may also |