/emacs-fast-start

Simple Emacs init files for make your start easy and fast.

Primary LanguageEmacs LispGNU General Public License v3.0GPL-3.0

Emacs Fast Start

This repo is proposed to help users to start using Emacs editor. In this code I choose the essential packages and configurations to have a happy start with this amazing editor.

Installation

Before start, make sure that you don't have .emacs and .emacs.d in your home directory:

ls -la ~/ | grep emacs

This command shouldn't return anything!

Since you don't have any files in your home directory, let's begin!

Clone the repo:

git@github.com:squiter/emacs-fast-start.git

Then enter in repo directory:

cd emacs-fast-start

Then make it:

make

This will copy .emacs and .emacs.d to your home directory.

Ok, that's it! :)

Starting with Emacs

Downloading

I'm a OSX user and I recommend you to use one of these builds for Emacs:

For Ubuntu you can:

sudo apt-get build-dep emacs24 -y

cd /tmp/

wget http://alpha.gnu.org/gnu/emacs/pretest/emacs-25.0.93.tar.xz
tar -xvf emacs-25.0.93.tar.xz

cd emacs-25.0.93
./configure
make
sudo make install

rm -rf /tmp/emacs-25.0.93*

Learning more

First of all, you must understand how to speak Emacs's Language:

  • C is ctrl;
  • M is Meta that in my configuration is alt;
  • S is Super that in my configuration is command.

When I said C-h t you must to push ctrl and h key simultaneously, release it and press t key.

Tutorial

Now I recommend you to open your Emacs and type: C-h t and do the EmacsTutorial.

More about this repository

This repo has a init-file called .emacs. In this file I call all files that we need to start, let's take a look in some of them:

  • init-packages have all settings to install packages;
  • init-constants have some configurations for directories and etc. You should take a especial look here;
  • init-custom-functions have some functions that I missed from Vim, like a new line like 'o' command;
  • init-mac-switch-meta have some specific OSX configurations. If you don't use OSX you can delete this file.

Usefull keybindings

  • M-x - It's a version of M-x in helm! It's awesome!
  • C-c o - Open project from Renan Ranelli, this function use heml and projectile to list your projects*;
  • C-x f - After enter in a project, you can find any file in there with this keybinding;
  • C- - Insert a new line (like 'o' of vim);
  • C-a - Smart way to go to start of line, press twice to see the magic;
  • C-c d - Duplicate line;
  • C-x - - To split your buffer horizontally;
  • C-x | - To split your buffer vertically;
  • C-x = - To swap your buffers;
  • C-x C-k - Delete current buffer file;
  • C-x C-r - Rename current buffer file;
  • C-c / - Toggle comments in selected lines;
  • C-c j - Join lines;
  • C-c w - Clean buffer whitespaces;
  • C-c i - Auto indent this buffer.

* You must configure your project directory in .emacs.d/conf/init-constants.el before use it.

OSX Keybindings

  • S-a - Mark whole buffer;
  • S-v - Yank (paste);
  • S-c - Kill ring (copy);
  • S-s - Save current buffer;
  • S-l - Go to line;
  • S-w - Delete window;
  • S-z - Undo;
  • S-k - Kill current buffer;
  • S-u - Revert current buffer.

Packages

The idea of this repository is to let you choose what is the most important to you, so I add a minimal packages here.