Skip to content

Instantly share code, notes, and snippets.

@Alotor
Last active August 29, 2015 14:19
Show Gist options
  • Save Alotor/feb290890083fcc9f5c0 to your computer and use it in GitHub Desktop.
Save Alotor/feb290890083fcc9f5c0 to your computer and use it in GitHub Desktop.
Notas del Kaleidos-emacs friday's (24/04/2015)

KALEIDOS EMACS MEETING

Confirmar para salir de emacs

(setq confirm-kill-emacs #’y-or-n-p)

Cambiar alternativamente entre dos buffers

(define-key global-map (kbd “M-o”) ‘mode-line-other-buffer)

Ampilar la fuente en emacs

(define-key global-map (kbd “C-+”) ‘text-scale-increase)

(define-key global-map (kbd “C–”) ‘text-scale-decrease)

Sacar ayuda al ejecutar un comando

C-h k > Ejecutar el comando que quieras ej: C-x c

Apropos

C-h a > Escribir el texto que quieras sacar el apropos

¿como redimensionar un buffer (cuando esta split) usando comandos?

C-x ^ Enlarge window

(enlarge-window -4) decrementa verticalmente

(enlarge-window 4 t) incrementa en horizontal

Lazy load de (ramiros) paquetes

Como remplazar vim “c i ‘”

expand-region

(global-set-key (kbd “C-‘”) ‘er/expand-region)

change-inner

Toño: ¿como saltar rapidamente?

ace-jump-mode

C-x o -> cambiar buffer

S-M-> ir al final del buffer

S-M-< ir al principio

C-x h seleccionar

Anler: Marcas

ace-jump-mode respeta la marca

Buscar tambien deja marca

C-x x alterna marcas

C-u C-space recorre

M-a backward sentence

Anler: hack para saltar rapidamente

Para que al buscar y pulses intro te ponga en el principio de la palabra

(defvar isearch-done-opposite nil “Wether or not isearch must end at the opposite end.”)

(defun isearch-done-opposite (&optional nopush edit) (interactive) (let ((isearch-done-opposite t)) (funcall #’isearch-done nopush edit)))

(defadvice isearch-done (after isearch-goto-beginning-of-match activate) “After finding a match position put the cursor at the beginning of the match only if searching forward.” (when isearch-done-opposite (goto-char isearch-other-end)))

(define-key isearch-mode-map (kbd “C-<return>”) ‘isearch-done-opposite)

Anler: quiero tu mierda de buscar en otra ventana

bind-key para facilitar el mapeo

describe-personal-keybinding

kill-sexp (C-M-k) borra la sexp donde estas

Muy util con multiple cursors

Demo de Anler flipando O_o con multiple cursors

fullframe + magit

se podria crear una funcion wrapper que se asocie a fullframe

shell-doc

te saca el man automaticamente de los comandos (cuando ejecutas M-!)

undo-tree

Modifica el deshacer “normal”

wgrep-help (o wgrep)

Convierte un buffer de grep (o ag) en editable

Puedes hacer un replace all de todos los ficheros

ggtags + gnuglobals

Funciona perfecto

Para javascript usar mejor “tern”

Mario: Autocompletado no respeta el case

dabrev-case-fold-search

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment