Mi primera configuracion

Rock Neurotiko & Ignacio Ballesteros

Created: 2017-01-31 mar 18:17

Introducción a emacs

Que es?

  • Editor de texto
  • Configurable / Programable
  • Completamente libre (GNU Emacs GPL, Stallman style)
  • Raton, que raton?

Opiniones

  • Es un entorno donde creas tu propia herramienta como quieras. Es divertido como LEGO, hay infinitos modos de jugar con ello. (reddit)
  • I like Emacs for the same reason I like the piano.

    My knowledge and learning will take me far.

    I used both 30 years ago.

    I will use both 30 years from now if I am still around.

    Such reliable tools help you stop thinking about tools, and start creating the art or engineering that is your gift to the rest of us.

Opiniones propias

  • Es una herramienta que me permite abstraerme de todo y realizar todo en un lugar, y si no tengo algo, lo puedo crear. (Rock)
  • Las dinámicas de trabajo comunes se amparan en un entorno único. Con Emacs puedo experimentar, conocer, y aprender con más libertad. (Ignacio)

Comandos

  • Control (C)
  • Alt (Meta) (M)
  • Windows (Super) (s)
  • M-x (Simples)
  • C-x C-s (Multiples combinadas)
  • C-h k (Con letras sueltas)

Moverse

  • C-p, flecha arriba
  • C-n, flecha abajo
  • C-b, flecha izquierda
  • C-f, flecha derecha
  • C-s / C-r, buscar

Atajos basicos

  • C-x C-c
  • C-x C-s (Guardar)
  • M-x
  • C-h [f | m | v]

Introducción a elisp

Parentesis

(todo (va (entre (parentesis))))
  • Primera "palabra" es el comando, todo lo demas son argumentos
(shell-command "ls")

Ejecutar

Para ejecutar elisp en emacs, C-x C-e

(+ 1 2 3 4)

(/ (* 4 10) (+ 5 10))

Dónde encontrar paquetes!

Sin configuración

Lo facil…

http://emacs-bootstrap.com/

Configurar melpa

En ~/.emacs.d/init.el

(require 'package) ;; You might already have this line
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line

Modulos a instalar

  • Tema
    • zenburn-theme
  • Multi-term
    • multi-term
  • Reveal
    • ox-reveal
  • Undo
    • undo-tree
  • git gutter
    • git-gutter-fringe+
  • yasnippet
    • yasnippet
  • magit
    • magit
  • spotify
    • spotify
  • Elixir
    • elixir-mode
    • alchemist
  • Scala
    • scala-mode
  • Python
    • elpy

Mi primera configuración

Package

(when (>= emacs-major-version 24)
  (require 'package)
  (add-to-list
   'package-archives
   '("melpa" . "http://melpa.org/packages/") t)
  (add-to-list
   'package-archives
   '("melpa-stable" . "http://melpa-stable.milkbox.net/packages/") t)
  (package-initialize))

use-package

(unless (featurep 'use-package)
  (package-refresh-contents)
  (package-install 'use-package)
  )

Modulos a instalar

  • Tema
    • zenburn-theme

  • Multi-term
    • multi-term

  • Reveal
    • ox-reveal

  • Undo
    • undo-tree

  • git gutter
    • git-gutter-fringe+

  • yasnippet
    • yasnippet

  • magit
    • magit

  • spotify
    • spotify

  • Elixir
    • elixir-mode
    • alchemist
  • Scala
    • scala-mode

  • Python
    • elpy

Configuración modular

use-package

(unless (featurep 'use-package)
  (package-refresh-contents)
  (package-install 'use-package)
  )

Modulos

  • Tema (zenburn-theme)
  • Multi-term
  • Reveal (ox-reveal)
  • Undo (undo-tree)
  • git gutter (git-gutter-fringe+)
  • yasnippet
  • magit
  • spotify
  • Elixir (elixir-mode && alchemist)
  • Scala (scala-mode)
  • Python (elpy)

Configuración basada en org

¿Qué es org-mode?

Modo de Emacs para editar texto plano orientado a notas.

(Parece poca cosa)

Para una lista más extensa :: http://orgmode.org/features.html

¿Para qué lo vamos a usar hoy?

ORGanización de nuestra configuración.

  • ~org-babel-tangle-
    • C-c C-v t en este fichero (presentacion.org)
  • Ya tenemos nuestro código en el fichero elegido :)
  • ./init.el
  • Ejemplo de configuración con org.

Gracias

Created by rockneurotiko.