1.4. Using Buffers and Windows

1.4.1. Using Buffers

To Keystrokes Command Name
Move to the buffer specified C-x b buffername switch-to-buffer
Display the buffer list C-x C-b list-buffers
Delete the buffer specified C-x k buffername kill-buffer
Ask about deleting each buffer ESC x kill-some-buffers
Change the buffer's name ESC x rename-buffer
Ask about saving each modified buffer C-x s save-some-buffers

1.4.1.1. Buffer list commands
To Keystrokes
Move to the next buffer SPACE or n
Move to the previous buffer p
Mark buffer for deletion d or k
Save buffer s
Unmark buffer u
Execute other one-letter commands on all marked buffers x
Unmark the previous buffer in the list DEL
Mark buffer as unmodified ~
Toggle read-only status of buffer %
Display buffer in a full screen 1
Display this buffer and the next one in horizontal windows 2
Replace buffer list with this buffer f
Replace other window with this buffer o
Mark buffers to be displayed in windows m
Display buffers marked with m; Emacs makes as many windows as needed v
Quit buffer list q

1.4.2. Using Windows

Windows subdivide the current Emacs window. To create new Emacs windows, see the following section on Frames.

To Keystrokes Command Name
Create two windows, one on top of the other C-x 2 split-window-vertically
Move to the other window C-x o other-window
Delete the current window C-x 0 delete-window
Delete all windows but this one C-x 1 delete-other-windows
Make window taller C-x ^ enlarge-window
Make window shorter ESC x shrink-window
Scroll other window ESC C-v scroll-other-window
Find a file in another other window C-x 4 f find-file-other-window
Delete buffer and window (asks for confirmation) C-x 4 0 kill-buffer-and-window

1.4.3. Using Frames

Frame commands apply only when Emacs is running under a GUI, such as X Windows.

To Keystrokes Command Name
Make a new frame C-x 5 2 make-frame-command
Move to another frame C-x 5 o other-frame
Delete current frame C-x 5 0 delete-frame
Find file in a new frame C-x 5 f find-file-other-frame
Make frame and display other buffer in it C-x 5 b switch-to-buffer-other- frame>

1.4.4. Using Bookmarks

Bookmarks provide an easy way to get back to a particular place in a file. They are also handy shortcuts for quickly finding files with long pathnames.

1.7.4.1. Bookmark commands
To Keystrokes Command Name
Set a bookmark at the current cursor position C-x r m bookmark-set
Jump to a bookmark C-x r b bookmark-jump
Rename a bookmark ESC x bookmark-rename
Delete a bookmark ESC x bookmark-delete
Save bookmarks ESC x bookmark-save
Move to bookmark list C-x r l bookmark-bmenu-list
Insert full text of file associated with a given bookmark ESC x bookmark-insert
Save all bookmarks in a specified file ESC x bookmark-write
Load bookmarks from a specified file ESC x bookmark-load

1.4.4.2. Bookmark list
To Keystrokes
Flag bookmark for deletion d
Rename bookmark r
Save all bookmarks listed s
Display the bookmark the cursor is on f
Mark bookmarks to be displayed in multiple windows m
Display marked bookmarks or the one the cursor is on if none is marked v
Toggle display of paths to files associated with bookmarks t
Display location of file associated with bookmark w
Delete bookmarks flagged for deletion x
Remove mark from bookmark u
Remove mark from bookmark on previous line DEL
Exit bookmark list q

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset