Giter Site home page Giter Site logo

relaynetwork / emacs Goto Github PK

View Code? Open in Web Editor NEW
2.0 37.0 2.0 4.12 MB

Emacs Configuration (derived from kyleburton/krbemacs)

Emacs Lisp 72.88% Ruby 0.21% Shell 0.08% Common Lisp 22.39% Scheme 2.62% Makefile 0.07% TeX 0.07% Awk 0.01% Clojure 1.38% Python 0.04% CSS 0.18% Roff 0.06%

emacs's Introduction

Kyle’s Emacs Configuration

This git repository is my personal Emacs configuration and set up. It is set up so that you can base your configuration off of it, with your own customizations, and still keep the base configuration up to date. I have attempted to make it as easy to set up and use as I can, though it can always be improved. If you have suggestions, recommendations or feedback I’d be very happy to hear from you.

Kyle Burton <[email protected]>

Installation

I’ve tried to make installation as simple as possible. Once you’ve cloned the git repository, symlink (or copy if you can’t symlink) the .emacs file from the git repository to your $HOME directory. This is typically accomplished on a unix platform with commands like the following:

kyle@indigo64 ~$ mkdir -p personal/configuration
kyle@indigo64 ~$ cd personal/configuration
kyle@indigo64 ~/personal/configuration$ git clone git://github.com/kyleburton/krbemacs.git
kyle@indigo64 ~/personal/configuration$ cd krbemacs
kyle@indigo64 ~/personal/configuration/krbemacs$ ln -s `pwd`/.emacs ~

Pre-requisites

The only software that you need installed should be Emacs. I have only been using recent versions of emacs (22.3) and do not know if it works with older versions of Emacs at this time.

Features

At this time I’m doing most of my active software development in Ruby (Rails) and Clojure, so those are the two best represented languages in this configuration. For other modes or libraries that did not come with the base install of Emacs, I have included them in this git repository so that they do not need to be installed or tested outside of what you get with this project.

Ruby

The configuration includes ruby-mode which should activate when you open a Rakefile or a *.rb file.

Clojure

Snippet Support

yasnippet is included in this configuration. It is an easily customizable snippet (expansion) library. You can find the actual snippets in

Abbreviated Guide

M-x means press the ‘Meta’ (typically the Alt) key and the ‘x’ at the same time.

M-X means press the ‘Meta’ (typically the Alt) key, the Shift and the ‘x’ at the same time – ‘alt and capital X’.

Emacs supports the ‘Esc’ key as an alternate to the Meta key – though you don’t hold it down, you press ‘Esc’ and release it and then the second character. So M-x and Esc x will achieve the same thing in Emacs. The reason I’m telling you this is that one day you may find yourself on a system that for some reason has re-mapped the Alt/Meta key to something else or that you’ve ssh’d into and for some reason Meta/Alt isn’t working. Knowing about Esc can at least get you by in these situations.

C-x means press the ‘Control’ key and the ‘x’ at the same time.

In these keystroke examples, the hyphen ‘-’ means to press the keys at the same time, a space indicates that you should let go of the previous key before pressing the next one. C-c r C-t means “press ‘control-c’ (at the same time), release them, press and release ‘r’, and press ‘control-t’ and release it”.

Emacs supports so many features that there are not enough single key key bindings (hotkeys, keyboard accelerators) to access all of its features. This is why there are so many multi-key and multi-sequence key bindings. Once you learn a bit about how to customize Emacs, you can rebind the features and keybindings to you liking – later on in this guide I’ll show you how to do that with your own configuration.

Running a Function without a Keybinding

Emacs allows you to run arbitrary internal functions. There are two ways to do this. There are two classes of functions in Emacs, one class is declared as being invokable directly by the user, these are called ‘interactive’, the other are just internal functions which you can’t call directly (meaning from a keybinding or via M-x).

If a function doesn’t have a keybinding, and you know it’s name, you can invoke it directly by pressing M-x and then typing the name of the function. For instance, to see the version of the Emacs you’re running, you can run the ‘version’ function directly by typing: M-x version and then pressing enter.

‘Forcing’ a Mode in a File

Emacs supports you setting the mode of a file from a comment at the top of the file. This is useful in cases where the regular expression pattern matching used based on the file name extension doesn’t recognized the type of the file and put it into the mode you want. In some cases you may also wish to force Emacs into an alternate mode for a file that would otherwise be set to a specific mode.

You can change the mode of a file with a comment (in the syntax of the langugae of the file) at the top with the form:

  #!/bin/bash
  # -*- zsh-mode -*
  ...

emacs's People

Contributors

jcrean avatar kyleburton avatar nickcanz avatar pat-thomas avatar rn-ci avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

nickcanz dmead

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.