User Tools

Site Tools


emacs_tutorial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
emacs_tutorial [2021/03/21 06:18] – [Emacs Modes] hc9emacs_tutorial [2021/03/21 06:21] – [Buffers] hc9
Line 103: Line 103:
 ===== Buffers ===== ===== Buffers =====
  
-When you visit a file with "C-x C-f", Emacs loads the file into a new buffer created just for that file. Existing buffers are not destroyed, but persist and can be switched to with "C-x b". Emacs will prompt you for a buffer name to switch to; tab-completion works here as it does in other places. One tip that I wish I had known when I first started using Emacs is to use a special mode called //iswitch mode// to help manage buffers. Since it's not uncommon to have dozens of buffers in an Emacs editing session, you can easily forget buffer names. With iswitch mode enabled, a "C-x bdisplays a list of buffers in the echo area that changes in real-time as you type characters. You don't even have to type the first few letters of a buffer name, any substring of a buffer name will do. To enable iswitch mode, type the extended command "M-x iswitchb-mode(we'll see later how to permanently enable modes like this in a startup file). To see a list of all buffers, type "C-x C-b". The buffer list will appear in a new window. Here is a list of some useful buffer commands:+When you visit a file with ''C-x C-f'', Emacs loads the file into a new buffer created just for that file. Existing buffers are not destroyed, but persist and can be switched to with ''C-x b''. Emacs will prompt you for a buffer name to switch to; tab-completion works here as it does in other places. One tip that I wish I had known when I first started using Emacs is to use a special mode called //iswitch mode// to help manage buffers. Since it's not uncommon to have dozens of buffers in an Emacs editing session, you can easily forget buffer names. With iswitch mode enabled, a ''C-x b'' displays a list of buffers in the echo area that changes in real-time as you type characters. You don't even have to type the first few letters of a buffer name, any substring of a buffer name will do. To enable iswitch mode, type the extended command ''M-x iswitchb-mode'' (we'll see later how to permanently enable modes like this in a startup file). To see a list of all buffers, type ''C-x C-b''. The buffer list will appear in a new window. Here is a list of some useful buffer commands:
  
 | C-x b | Switch to another buffer | | C-x b | Switch to another buffer |
emacs_tutorial.txt · Last modified: 2021/03/21 06:38 by hc9