My configuration for emacs since Dec, 2020 till now.
- Emacs version: latest (current 30.05 in development)
- System: MacOS and Linux
I learn a lot from spacemacs, which is a popular emacs configuration. I used it during 2017-2020. The key features I like:
- Integrate the evil package very well.
- Use leader keys to simplify key bindings, such as “space” in evil normal mode, “comma” for major mode, and so on.
- Jumping among different windows easily with the support of the evil package.
After reading part of the source codes in spacemacs, I know I can handle the similar experience with the packages:
- general: leader keybindings
- evil: vim in emacs
- evil-collection: make evil more smooth.
- helm: search anytime, anywhere.
- eglot (default in Emacs) or lsp (provide majority of utilities): provide powerful, unified programming language support.
- macOS: emacs-plus or Emacs for macOS.
- Linux: follow the instruction from the official website
Emacs needs to read a configuration file init.el, just like the
one in this repository. In order to use the configurations here,
you can
# back up original configuration if you have.
cp -r ~/.emacs.d ~/dot_emacsd_bk
rm -r ~/.emacs.d
# download this configuration.
cd ~ && git clone https://github.com/beyondpie/.emacs.d
# download the packages this configuration needs
cd ~/.emacs.d && git clone https://github.com/beyondpie/myelpaThen you can open Emacs, which will takes some time to set up the configurations only at the first time you use this configuration.
- In current config, we use
(setq package-archives '(("melpa" . "~/.emacs.d/myelpa/")))in~/.emacs.d/init.elto set the local archieves, where myelpa points to the git repository above. - If you want to use network to install packages (this happens when you have your configurations, and
packages are not included in myelpa), you can firstly
use
(setq package-archives '(("melpa" . "https://melpa.org/packges/"))). Then generate the local archives by yourself. - We can also use both local and website by setting different names of the package archives and set it explicitly
when using
use-packageto install some package.