Skip to content

Latest commit

 

History

History
133 lines (88 loc) · 4.05 KB

README.org

File metadata and controls

133 lines (88 loc) · 4.05 KB

emacs config

Emacs Version tested: 24.3.1 (stable) & 25.0.50.2 (dev branch)

Installation

Clone my repo

git clone https://github.com/map7/emacs-config.git ~/.emacs.d

Run installation script

cd ~/.emacs.d
./install

Start emacs

emacs

List packages (Note: M-x is emacs way of saying Alt + x)

M-x list-packages

Install use-package with

M-x package-install use-package

Then restart emacs and it should start building the packages, if it asks you to build pdf-tools say yes and in the compile buffer it will show the results. If this compile is needed then after the compile is finished you will need to restart emacs again for the final run of packages.

Manually

Install my sub modules

git submodule init

Based upon Cask & Pallet.

Install cask

curl -fsSkL https://raw.github.com/cask/cask/master/go | python

Add path to your ~/.zshenv or ~/.bashrc file

# Add Cask to the path
export PATH="$HOME/.cask/bin:$PATH"

Run cask which will install the pallet package management tool

cd ~/.emacs.d
cask install

Optional - Initialise your cask file from within emacs

M-x pallet-init

exwm - Emacs X Windows Manager notes

Setup the session

Copy the xinitrc.sample

cp xinitrc.sample ~/.xinitrc

Link it to .xsession to work with a desktop manager like lightdm as the default session.

ln -s ~/.xinitrc ~/.xsession

Autostart GUI apps

To autostart things like dropbox or spideroak you need to put them into a file called ~/.emacs.autostart.el and this will automatically load.

Here is an example of starting dropbox & spideroak

;; Autostart Dropbox
(call-process-shell-command "(sleep 10s && ~/.dropbox-dist/dropboxd) &" nil 0)
(call-process-shell-command "(sleep 10s && SpiderOakONE) &" nil 0)

Multiple screens

Create a ~/.emacs.randr.el file and put the following

(setq exwm-randr-workspace-output-plist '(0 "LVDS1" 1 "LVDS1" 2 "DP2"))
(add-hook 'exwm-randr-screen-change-hook
         (lambda ()
           (start-process-shell-command
            "xrandr" nil "xrandr --output DP2 --right-of LVDS1 --output DP2 --mode 1920x1080")))
(exwm-randr-enable)

Remember to change the LVDS1 & DP2 to your screens which you can find out by typing in xrandr at the command line and looking for the active screens.

flycheck configure

Installing

npm install -g coffeelint eslint
gem install scss_lint rubocop

Add this to your ~/.emacs.d/.emacs.custom.el file.

(custom-set-variables
 '(flycheck-ruby-rubocop-executable "/usr/local/rbenv/shims/rubocop" )
 '(flycheck-javascript-eslint-executable "/opt/node-v5.5.0-linux-x64/bin/eslint")
 '(flycheck-coffee-coffeelint-executable "/opt/node-v5.5.0-linux-x64/bin/coffeelint")
 '(flycheck-coffeelintrc "~/coffeelint.json"))

Make the config file for coffeelint

coffeelint --makeconfig > coffeelint.json

Requirements

ag - Compile the silver searcher, first check if you already have the ‘ag’ command

flyspell - install ‘ispell’

Specific package notes

paradox

If you want to use the paradox package list instead of the normal boring listing then you have to make a file ~/.emacs.paradox.el and add the following

(setq paradox-github-token TOKEN)

Where TOKEN is your github token.

Yasnippet + ruby

For ruby mode I use enh-ruby-mode, which is just a symlink of ruby-mode snippets. I’ve also added all the rails snippets to this as well.

org-clock-csv

Add the following to your crontab

# Export all my timesheets to a csv file
00 5    * * *   map7    /usr/bin/emacs -batch -l ~/.emacs.d/init.el -eval "(org-clock-csv-batch (org-agenda-files nil t))" > /home/map7/timesheets.csv

References

http://crypt.codemancers.com/posts/2013-09-26-setting-up-emacs-as-development-environment-on-osx/

Issues

Projectile not finding files

Try to invalidate the project cache, first sit in a file within a project dir

C-c p i

changelog

09/02/2015

Added

  • sunshine - weather
  • symon - system monitor, replaces gkrellm
  • ox-reveal - reveal.js presentation tool