summaryrefslogtreecommitdiff
path: root/config.org
diff options
context:
space:
mode:
Diffstat (limited to 'config.org')
-rw-r--r--config.org24
1 files changed, 21 insertions, 3 deletions
diff --git a/config.org b/config.org
index d0fa8a8..0c95f9b 100644
--- a/config.org
+++ b/config.org
@@ -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=