Now that we're past the intro material, we'll start looking at emacs features one at a time. This will let you focus on using the one feature we're covering, fit it into your work flow, and really get comfortable with it.
This time we'll dive into using Emacs effectively with buffers.
Watch the video and then make a real effort to use buffers over the next few emacs sessions. Before you know it, they'll be a natural part of your work flow.
When seeing beginners, I'll frequently observe this work flow:
Open a terminal
Load emacs on a file
Edit the file
Save and quit emacs
Try to compile and run the program (since usually this is in a programming class)
If the beginner needs to see multiple files at once, they fire up multiple separate emacs.
All of this causes me physical pain.
In emacs, your editor can load several buffers at once, each associated with a separate file. You can quickly switch between them, search across them, and more. The video will get you started.
The video also mentions ido mode. To set up ido mode, add the following code to your init.el:
(setq ido-enable-flex-matching t) (setq ido-everywhere t) (ido-mode 1)
And here's a great little write up on it by Mickey Petersen:
For buffers, the keys to remember are:
To use ibuffer, which is more powerful than list-buffers you can add either:
(defalias 'list-buffers 'ibuffer) ; make ibuffer default
Or if you want to open ibuffer in another Window:
(defalias 'list-buffers 'ibuffer-other-window) ; make ibuffer default
Here are a couple of useful links on ibuffer and buffer switching:
Finally, if you like a tab bar, you can add the following to your init.el:
(use-package tabbar :ensure t :config (tabbar-mode 1) )
There's also a package tabbar-ruler which is supposed to make the tabbar look nicer but since I don't use the tabbar at all, I haven't checked it out.
Hope this gets you using emacs more effectively.
Stay tuned for our next video on window management.
Video series overview page:
Code for this video:
Complete code built up over all videos: