diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | config.org | 24 |
2 files changed, 22 insertions, 3 deletions
@@ -11,6 +11,7 @@ auto-save-list/ eln-cache/ elpa/ games/ +image-dired/ irony/ lisp/ transient/ @@ -319,11 +319,10 @@ My preferred org-mode defaults (set-frame-parameter nil 'alpha (if (eql (cond ((numberp alpha) alpha) - ((numberp (cdr alpha)) (cdr alpha)) - ;; Also handle undocumented (<active> <inactive>) form. - ((numberp (cadr alpha)) (cadr alpha))) + ((numberp (cdr alpha)) (cdr alpha))) 100) '(90 . 90) '(100 . 100))))) + (global-set-key (kbd "C-c t") 'toggle-transparency) #+end_src @@ -385,6 +384,25 @@ My preferred org-mode defaults (global-set-key (kbd "C-M-s-k") 'kill-all-buffers) #+end_src +** Find-next-file + +#+begin_src emacs-lisp + (defun find-next-file (&optional backward) + "Find the next file (by name) in the current directory. + + With prefix arg, find the previous file." + (interactive "P") + (when buffer-file-name + (let* ((file (expand-file-name buffer-file-name)) + (files (cl-remove-if (lambda (file) (cl-first (file-attributes file))) + (sort (directory-files (file-name-directory file) t nil t) 'string<))) + (pos (mod (+ (cl-position file files :test 'equal) (if backward -1 1)) + (length files)))) + (find-file (nth pos files))))) + + (global-set-key (kbd "C-c C-j") 'find-next-file) + (global-set-key (kbd "C-c C-k") (lambda () (interactive) (find-next-file :backward))) +#+end_src * Use-Package section ** Initialize =dashboard= |
