Giter Site home page Giter Site logo

emacs-config's Introduction

My emacs literate configuration file

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")

Utility Cheat Sheet

KeyFunctionEvil Equivalent
C-x C-wWrite Current Buffer:write <filename>
C-x C-sSave Current Buffer:write
C-x sSave all open Buffers
C-x bSwitch Buffers:buffer
C-x iCopy file to current buffer:read <filename>
C-x kKill Buffer:quit
C-gAbort commands
C-h tEmacs basic Tutorial
C-h fDescribe Function by name
C-h vDescribe Variable by name
C-h cDescribe the Function a key calls
C-h mGet mode-specific information
M-xEmacs Function Call
C-x C-cExit Emacs

Emacs runit service

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 +

emacs-config's People

Contributors

matman26 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.