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)
|
||||
(global-ace-isearch-mode +1)
|
||||
:bind (:map isearch-mode-map
|
||||
("C-'" . ace-isearch-jump-during-isearch)))
|
||||
("C-'" . ace-isearch-jump-during-isearch))
|
||||
:diminish ace-isearch-mode)
|
||||
#+END_SRC
|
||||
|
||||
** Seguir enlaces simbólicos
|
||||
|
@ -636,7 +637,8 @@ torify git "$@"
|
|||
(use-package company
|
||||
:ensure t
|
||||
:config
|
||||
(add-hook 'after-init-hook 'global-company-mode))
|
||||
(add-hook 'after-init-hook 'global-company-mode)
|
||||
:diminish company-mode)
|
||||
#+END_SRC
|
||||
** Borrar espacios sobrantes
|
||||
:PROPERTIES:
|
||||
|
@ -1543,7 +1545,9 @@ La configuración de elpy:
|
|||
(el-get 'sync 'elpy))
|
||||
|
||||
(use-package elpy
|
||||
:load-path "el-get/elpy/"
|
||||
:init
|
||||
(use-package pyvenv :ensure t)
|
||||
(setq elpy-modules '(elpy-module-sane-defaults elpy-module-company elpy-module-eldoc elpy-module-pyvenv))
|
||||
(add-hook 'python-mode-hook 'flycheck-mode)
|
||||
(setq elpy-rpc-backend "jedi")
|
||||
|
@ -2580,8 +2584,38 @@ directory to make multiple eshell windows easier."
|
|||
:PROPERTIES:
|
||||
:CUSTOM_ID: Reabrir buffer con sudo
|
||||
: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
|
||||
(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)
|
||||
"Edit currently visited file as root.
|
||||
|
||||
|
@ -2593,5 +2627,4 @@ buffer is not visiting a file."
|
|||
(find-file (concat "/sudo:root@localhost:"
|
||||
(ido-read-file-name "Find file(as root): ")))
|
||||
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
|
||||
|
||||
#+END_SRC
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
;; If there is more than one, they won't work right.
|
||||
'(custom-safe-themes
|
||||
(quote
|
||||
("71ecffba18621354a1be303687f33b84788e13f40141580fa81e7840752d31bf" default))))
|
||||
("71ecffba18621354a1be303687f33b84788e13f40141580fa81e7840752d31bf" default)))
|
||||
(put 'upcase-region 'disabled nil)
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
|
|
|
@ -26,7 +26,7 @@ bindsym $mod+Return exec termite
|
|||
bindsym $mod+Shift+Q kill
|
||||
|
||||
# arrancar dmenu
|
||||
bindsym $mod+d exec dmenu_run
|
||||
bindsym $mod+d exec --no-startup-id rofi -show combi
|
||||
|
||||
# Reinicia i3
|
||||
bindsym $mod+Shift+r restart
|
||||
|
|
|
@ -181,7 +181,7 @@ then
|
|||
|
||||
elif [[ $2 = "qutebrowser" ]]
|
||||
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
|
||||
|
||||
elif [[ $2 = "emacs" ]]
|
||||
|
|
Loading…
Reference in New Issue