My config requires evil-mode, org-mode and use-package. If you want to use it, make sure you have at least previously installed use-package. A minimal working ~/.emacs can look like this:
;; Change to your .emacs.d/ directory accordingly
(setq user-emacs-directory "/home/trajanus/.emacs.d")
(require 'package)
(require 'use-package)
(package-initialize)
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://stable.melpa.org/packages/"))
(use-package org
:ensure t)
(use-package evil
:ensure t
:config
(evil-mode 1))
;; Change to the path where you cloned the config to
(org-babel-load-file "/home/trajanus/.emacs.d/myinit.org")
Key | Function | Evil Equivalent |
---|---|---|
C-x C-w | Write Current Buffer | :write <filename> |
C-x C-s | Save Current Buffer | :write |
C-x s | Save all open Buffers | |
C-x b | Switch Buffers | :buffer |
C-x i | Copy file to current buffer | :read <filename> |
C-x k | Kill Buffer | :quit |
C-g | Abort commands | |
C-h t | Emacs basic Tutorial | |
C-h f | Describe Function by name | |
C-h v | Describe Variable by name | |
C-h c | Describe the Function a key calls | |
C-h m | Get mode-specific information | |
M-x | Emacs Function Call | |
C-x C-c | Exit Emacs |
If you are on a Linux distribution which uses runit, you can also use my runit service for running Emacs in server mode.
Before doing so, you should change the owner of the emacs service by changing “trajanus” to the name of your user on the run scripts at sv/emacs/ and sv/emacs/log/. Notice you can also change the path inside the script sv/emacs/log/run to move your server logs to another directory.
Once that is done, you can enable the service by symlinking the folder sv/emacs to your var/service directory.
ln -s ${PWD}/sv/emacs /var/service/
The logging allows you to troubleshoot if you find any issues, so do leave it enabled if you are setting it up for the first time. Once that is done, you can add something like this to your rc.local file:
export EDITOR="emacsclient -nc"
To use the graphical emacs client as your default editor, it may be necessary to also run the command:
xhost +