121 lines
4.2 KiB
EmacsLisp
121 lines
4.2 KiB
EmacsLisp
|
|
;; Soporte para la carga de paquetes con straight
|
|
;; antes se hacía con package.el
|
|
;; https://github.com/raxod502/straight.el
|
|
(defvar bootstrap-version)
|
|
(let ((bootstrap-file
|
|
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
|
(bootstrap-version 5))
|
|
(unless (file-exists-p bootstrap-file)
|
|
(with-current-buffer
|
|
(url-retrieve-synchronously
|
|
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
|
'silent 'inhibit-cookies)
|
|
(goto-char (point-max))
|
|
(eval-print-last-sexp)))
|
|
(load bootstrap-file nil 'nomessage))
|
|
|
|
(straight-use-package 'use-package) ;; carga el paquege use-package,
|
|
;; que hace algunas gollerías como
|
|
;; instalar paquetes
|
|
;; automáticamente o configurarlo.
|
|
|
|
|
|
;; Configure use-package to use straight.el by default
|
|
(use-package straight
|
|
:custom (straight-use-package-by-default t))
|
|
|
|
;; Esto carga las configuraciones locale
|
|
(load "~/.emacs.d/local.el")
|
|
|
|
|
|
(straight-use-package 'counsel)
|
|
(straight-use-package 'ivy)
|
|
(straight-use-package 'swiper)
|
|
(straight-use-package 'ace-window)
|
|
(straight-use-package 'magit)
|
|
(straight-use-package 'ess)
|
|
|
|
;(straight-use-package 'capf) ;; ??
|
|
|
|
(straight-use-package 'yaml-mode)
|
|
|
|
;;(straight-use-package 'tramp)
|
|
(straight-use-package 'sudo-edit)
|
|
|
|
|
|
;;(straigth-use-package 'helm)
|
|
|
|
;; (require 'package)
|
|
;; (package-initialize)
|
|
|
|
;; (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
|
|
;; (add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
|
|
;; (custom-set-variables
|
|
;; ;; custom-set-variables was added by Custom.
|
|
;; ;; If you edit it by hand, you could mess it up, so be careful.
|
|
;; ;; Your init file should contain only one such instance.
|
|
;; ;; If there is more than one, they won't work right.
|
|
;; '(package-selected-packages
|
|
;; (quote
|
|
;; (use-package conda ace-window org-plus-contrib cdlatex company-auctex magit auctex counsel ivy swiper))))
|
|
;; (custom-set-faces
|
|
;; ;; custom-set-faces was added by Custom.
|
|
;; ;; If you edit it by hand, you could mess it up, so be careful.
|
|
;; ;; Your init file should contain only one such instance.
|
|
;; ;; If there is more than one, they won't work right.
|
|
;; )
|
|
|
|
;; IVY, Swiper Counsel
|
|
(ivy-mode 1)
|
|
(setq ivy-use-virtual-buffers t)
|
|
(setq enable-recursive-minibuffers t)
|
|
(global-set-key "\C-s" 'swiper)
|
|
(global-set-key (kbd "C-c C-r") 'ivy-resume)
|
|
(global-set-key (kbd "<f6>") 'ivy-resume)
|
|
(global-set-key (kbd "M-x") 'counsel-M-x)
|
|
(global-set-key (kbd "M-y") 'counsel-yank-pop)
|
|
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
|
|
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
|
|
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
|
|
(global-set-key (kbd "<f1> l") 'counsel-find-library)
|
|
(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
|
|
(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
|
|
(global-set-key (kbd "C-c g") 'counsel-git)
|
|
(global-set-key (kbd "C-c j") 'counsel-git-grep)
|
|
(global-set-key (kbd "C-c k") 'counsel-ag)
|
|
(global-set-key (kbd "C-x l") 'counsel-locate)
|
|
(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
|
|
(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
|
|
|
|
;; ¿acentos? ¿utf8?
|
|
(require 'iso-transl)
|
|
|
|
;;Pijadas varias
|
|
(line-number-mode 't) ;;muestra el número de línea
|
|
(column-number-mode 't) ;; muestra el número de columna
|
|
(setq make-backup-files nil) ; don't make xxx~ files
|
|
(display-time) ;;muestra la hora
|
|
(setq make-backup-files nil) ;;no crea copias de seguridad (ficheros xxx~)
|
|
(setq kill-whole-line t) ;; C-k borra toda la línea
|
|
(savehist-mode 1) ;; guarda la historia del minibuffer
|
|
|
|
;; Dracula theme
|
|
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
|
|
(load-theme 'dracula t)
|
|
|
|
;; ace window
|
|
(global-set-key (kbd "M-o") 'ace-window)
|
|
|
|
;;; Stefan Monnier <foo at acm.org>. It is the opposite of fill-paragraph
|
|
(defun unfill-paragraph (&optional region)
|
|
"Takes a multi-line paragraph and makes it into a single line of text."
|
|
(interactive (progn (barf-if-buffer-read-only) '(t)))
|
|
(let ((fill-column (point-max))
|
|
;; This would override `fill-column' if it's an integer.
|
|
(emacs-lisp-docstring-fill-column t))
|
|
(fill-paragraph nil region)))
|
|
|
|
;; Handy key definition
|
|
(define-key global-map "\M-Q" 'unfill-paragraph)
|