/emacs

Emacs configuration for high performance development.

Primary LanguageEmacs Lisp

emacs-config

GNU Emacs configuration.

Based on the Emacs configuration of Przemek Hardyn.

Features

Avy

Move your cursor easily around whole screen. After activating desired mode, insert letter(s) to which you want to jump and press highlighted key(s) to proceed. avy

  • Ctrl + l - go to line
  • Ctrl + w - go to word (one letter)
  • Ctrl + space - go to word (two letters)

Multiple cursors

Use more than one cursor. You can combine this mode with variety of others. multiple-cursors

  • Alt + . - add cursor forward/below
  • Alt + , - add cursor backward/up

Snippets

Create your own templates or use default set. snippets

  • f tab - anonymous function snippet
  • fn tab - named function snippet
  • fnr tab - named function snippet with return
  • < tab - flexible HTML snippet
  • <c tab - flexible HTML snippet with class

Recursive grep

Search for code fragments based on string. rgrep

  • Alt + r - open rgrep

Undo tree

Easily try different ideas and never lose code by accident. undo-tree

  • Ctrl + x u - open undo-tree
  • Ctrl + f - move to the right branch
  • Ctrl + b - move to the left branch

Magit

Manage your git repositories directly in emacs. magit

  • Alt + m - open magit
  • h - open help and show key bindings (in magit)

Yanking

Copy & paste multiple strings. yank

  • Ctrl + y - paste, then by pressing Alt + y paste previously copied text

Expanding region

Use semantic text selection. expand-region

  • Alt + s - expand selection, then by pressing s expand it wider

Installation

  1. Download repository.
  2. Symlink or copy ./configs/.emacs and ./configs/.emacs.d to your home directory.

Included packages

Key bindings

  • Movement

    • Ctrl + f - move forward
    • Ctrl + b - move backward
    • Ctrl + n - move to next line
    • Ctrl + p - move to previous line
    • Ctrl + a - move to beginning of the line
    • Ctrl + e - move to ending of the line
    • Alt + f - move word forward
    • Alt + b - move word backward
    • Alt + right arrow - move forward (semantic)
    • Alt + left arrow - move backward (semantic)
    • Alt + up arrow - move up (semantic)
    • Alt + down arrow - move down (semantic)
    • Alt + < - move to beginning of the file
    • Alt + > - move to ending of the file
    • Alt + v - scroll down
    • Ctrl + v - scroll up
    • Alt + p - move line/region up
    • Alt + n - move line/region down
  • Selection

    • Ctrl + space - enter/exit text selection mode
    • Ctrl + . - mark next like this
    • Ctrl + , - mark previous like this
    • Ctrl + j - new line for many cursors
    • Alt + s - expand selection, then by pressing s expand it wider
    • Ctrl + x + p - select all
  • History and search

    • Alt + w - copy
    • Ctrl + k - cut
    • Ctrl + y - paste, then by pressing Alt + y paste previously copied text
    • Left arrow - undo
    • Right arrow - redo
    • Ctrl + s - search (forward)
    • Ctrl + r - search (backward)
    • Alt + g - recursive grep
  • Text removal

    • Alt + backspace - remove word backward
    • Alt + d - remove word forward
    • Ctrl + d - remove character forward
  • Files and console

    • Ctrl + c p f - search file
    • Alt + h - search file (helm)
    • Alt + l - search buffer (helm)
    • Ctrl + x b - search through open files
    • Alt + x - open console
    • Ctrl + x Ctrl + f - browse files
  • Avy

    • Ctrl + space - go to word (two letters)
    • Ctrl + w - go to word (one letter)
    • Ctrl + l - go to line
  • JavaScript

    • f tab - anonymous function snippet
    • fn tab - named function snippet
    • i tab - if snippet
    • ie tab - if else snippet
    • Ctrl + c i - js function description comment
  • Windows

    • Ctrl + x 3 - split screen vertically
    • Ctrl + x 2 - split screen horizontally
    • Ctrl + x o - move to next window
    • Ctrl + x 0 - close window
  • Other

    • Alt + ; - comment/uncomment line/selection
    • Ctrl + x u - open undo-tree buffer
    • Alt + m - open magit status buffer