Mejoras varias
This commit is contained in:
parent
0e7883ced0
commit
fe6f69d133
|
@ -529,7 +529,8 @@ Auto-instala los docsets:
|
||||||
(setq ace-isearch-function-from-isearch 'ace-isearch-swiper-from-isearch)
|
(setq ace-isearch-function-from-isearch 'ace-isearch-swiper-from-isearch)
|
||||||
(global-ace-isearch-mode +1)
|
(global-ace-isearch-mode +1)
|
||||||
:bind (:map isearch-mode-map
|
:bind (:map isearch-mode-map
|
||||||
("C-'" . ace-isearch-jump-during-isearch)))
|
("C-'" . ace-isearch-jump-during-isearch))
|
||||||
|
:diminish ace-isearch-mode)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Seguir enlaces simbólicos
|
** Seguir enlaces simbólicos
|
||||||
|
@ -636,7 +637,8 @@ torify git "$@"
|
||||||
(use-package company
|
(use-package company
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
(add-hook 'after-init-hook 'global-company-mode))
|
(add-hook 'after-init-hook 'global-company-mode)
|
||||||
|
:diminish company-mode)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Borrar espacios sobrantes
|
** Borrar espacios sobrantes
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
|
@ -1543,7 +1545,9 @@ La configuración de elpy:
|
||||||
(el-get 'sync 'elpy))
|
(el-get 'sync 'elpy))
|
||||||
|
|
||||||
(use-package elpy
|
(use-package elpy
|
||||||
|
:load-path "el-get/elpy/"
|
||||||
:init
|
:init
|
||||||
|
(use-package pyvenv :ensure t)
|
||||||
(setq elpy-modules '(elpy-module-sane-defaults elpy-module-company elpy-module-eldoc elpy-module-pyvenv))
|
(setq elpy-modules '(elpy-module-sane-defaults elpy-module-company elpy-module-eldoc elpy-module-pyvenv))
|
||||||
(add-hook 'python-mode-hook 'flycheck-mode)
|
(add-hook 'python-mode-hook 'flycheck-mode)
|
||||||
(setq elpy-rpc-backend "jedi")
|
(setq elpy-rpc-backend "jedi")
|
||||||
|
@ -2580,8 +2584,38 @@ directory to make multiple eshell windows easier."
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Reabrir buffer con sudo
|
:CUSTOM_ID: Reabrir buffer con sudo
|
||||||
:END:
|
:END:
|
||||||
Fuente: http://emacsredux.com/blog/2013/04/21/edit-files-as-root/
|
Fuente: [[http://emacsredux.com/blog/2013/04/21/edit-files-as-root/][http://emacsredux.com/blog/2013/04/21/edit-files-as-root/]]
|
||||||
|
Fuente: [[http://stackoverflow.com/a/16408592][http://stackoverflow.com/a/16408592]]
|
||||||
|
|
||||||
|
Es una mezcla de ambas fuentes.
|
||||||
|
#+name:abrir-sudo
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defadvice purpose-find-file-overload (after find-file-sudo activate)
|
||||||
|
"Find file as root if necessary."
|
||||||
|
(unless (and buffer-file-name
|
||||||
|
(file-writable-p buffer-file-name))
|
||||||
|
|
||||||
|
(let* ((buffer-file (buffer-file-name))
|
||||||
|
(coincidence (string-match-p "@" buffer-file))
|
||||||
|
(hostname)
|
||||||
|
(buffer-name))
|
||||||
|
(if coincidence
|
||||||
|
(progn
|
||||||
|
(setq hostname (substring buffer-file (+ coincidence 1)
|
||||||
|
(string-match-p ":" buffer-file (+ coincidence 1))))
|
||||||
|
(setq buffer-name
|
||||||
|
(concat
|
||||||
|
(substring buffer-file 0 coincidence) "@"
|
||||||
|
(replace-regexp-in-string ":" (concat "|sudo:" hostname ":")
|
||||||
|
buffer-file nil nil nil (+ coincidence 1))))
|
||||||
|
(find-alternate-file buffer-name))
|
||||||
|
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file))))))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Antes usaba esto, ahora desactivado:
|
||||||
|
|
||||||
|
#+name:abrir-sudo-viejo
|
||||||
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
(defun sudo-edit (&optional arg)
|
(defun sudo-edit (&optional arg)
|
||||||
"Edit currently visited file as root.
|
"Edit currently visited file as root.
|
||||||
|
|
||||||
|
@ -2593,5 +2627,4 @@ buffer is not visiting a file."
|
||||||
(find-file (concat "/sudo:root@localhost:"
|
(find-file (concat "/sudo:root@localhost:"
|
||||||
(ido-read-file-name "Find file(as root): ")))
|
(ido-read-file-name "Find file(as root): ")))
|
||||||
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
|
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(custom-safe-themes
|
'(custom-safe-themes
|
||||||
(quote
|
(quote
|
||||||
("71ecffba18621354a1be303687f33b84788e13f40141580fa81e7840752d31bf" default))))
|
("71ecffba18621354a1be303687f33b84788e13f40141580fa81e7840752d31bf" default)))
|
||||||
(put 'upcase-region 'disabled nil)
|
(put 'upcase-region 'disabled nil)
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
|
|
|
@ -26,7 +26,7 @@ bindsym $mod+Return exec termite
|
||||||
bindsym $mod+Shift+Q kill
|
bindsym $mod+Shift+Q kill
|
||||||
|
|
||||||
# arrancar dmenu
|
# arrancar dmenu
|
||||||
bindsym $mod+d exec dmenu_run
|
bindsym $mod+d exec --no-startup-id rofi -show combi
|
||||||
|
|
||||||
# Reinicia i3
|
# Reinicia i3
|
||||||
bindsym $mod+Shift+r restart
|
bindsym $mod+Shift+r restart
|
||||||
|
|
|
@ -181,7 +181,7 @@ then
|
||||||
|
|
||||||
elif [[ $2 = "qutebrowser" ]]
|
elif [[ $2 = "qutebrowser" ]]
|
||||||
then
|
then
|
||||||
$instalador libxkbcommon libinput qt5 qt5-webkit python3-PyQt5 python3-sip
|
sudo $instalador libxkbcommon libinput qt5 qt5-webkit python3-PyQt5 python3-sip
|
||||||
#sudo pip3 install qutebrowser
|
#sudo pip3 install qutebrowser
|
||||||
|
|
||||||
elif [[ $2 = "emacs" ]]
|
elif [[ $2 = "emacs" ]]
|
||||||
|
|
Loading…
Reference in New Issue