fixed visual line mode and added dired xdg-open
This commit is contained in:
parent
3d2ebdba6b
commit
2478a85ab1
37
conf.org
37
conf.org
|
@ -189,6 +189,14 @@ No need for startup screen, tool/menu/scrollbars, or backups
|
|||
(use-package rainbow-mode
|
||||
:ensure t)
|
||||
#+END_SRC
|
||||
** async
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package async
|
||||
:ensure t
|
||||
:delight async
|
||||
:init
|
||||
(dired-async-mode 1))
|
||||
#+END_SRC
|
||||
* library
|
||||
A place for duct tape code that I developed (or lovingly stole from others)
|
||||
** macros
|
||||
|
@ -373,6 +381,22 @@ NOTES:
|
|||
(setq magit-push-always-verify nil
|
||||
git-commit-summary-max-length 50))
|
||||
#+END_SRC
|
||||
* dired
|
||||
** interactive functions
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun nd/dired-xdg-open ()
|
||||
"Open all non-text files in external app using xdg-open. Only regular files are considered"
|
||||
(interactive)
|
||||
(let* ((file-list (seq-filter #'file-regular-p (dired-get-marked-files)))
|
||||
(do-it (if (<= (length file-list) 5)
|
||||
t
|
||||
(y-or-n-p "Open more then 5 files? "))))
|
||||
(when do-it
|
||||
(mapc
|
||||
(lambda (f) (let ((process-connection-type nil))
|
||||
(start-process "" nil "xdg-open" f)))
|
||||
file-list))))
|
||||
#+END_SRC
|
||||
* org-mode
|
||||
** major mode
|
||||
*** general config
|
||||
|
@ -1619,6 +1643,15 @@ I like being evil. All package and custom bindings go here.
|
|||
:ensure t
|
||||
:after (evil magit))
|
||||
#+END_SRC
|
||||
*** visual line mode
|
||||
This is somewhat strange because all I really care about is moving between lines and to the beginning and end as normal. However, I like the idea of thinking of paragraphs as one line (eg df. deletes a sentence even if on multiple lines). Opinion subject to change.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(evil-define-key 'normal 'visual-line-mode
|
||||
"j" 'evil-next-visual-line
|
||||
"k" 'evil-previous-visual-line
|
||||
"0" 'beginning-of-visual-line
|
||||
"$" 'end-of-visual-line)
|
||||
#+END_SRC
|
||||
*** collection
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package evil-collection
|
||||
|
@ -1658,6 +1691,10 @@ Dired makes new buffers by default. Use =find-alternate-file= to avoid this
|
|||
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)
|
||||
(define-key helm-map (kbd "C-<tab>") 'helm-select-action)
|
||||
#+END_SRC
|
||||
*** dired
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(define-key dired-mode-map (kbd "C-<return>") 'nd/dired-xdg-open)
|
||||
#+END_SRC
|
||||
** global
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(global-set-key (kbd "<f1>") 'org-agenda)
|
||||
|
|
Loading…
Reference in New Issue