Browse Source

Ido really everywhere, colors, clipboard

* Fix more clipboard problems with copy line (save excursion)
* ido ubiquitous now installed and enabled (yay!)
* Open path highlighted with macoy-open-marked-path-file
* Some ideas on jumping between functions (disabled)
* Work on org-jira labels (not completed)
* ReBuilder now has different colors per group (TODO: get from theme)
master
Macoy Madson 2 years ago
parent
commit
81260067e9
7 changed files with 68 additions and 9 deletions
  1. +5
    -5
      Emacs/clipboard.el
  2. +11
    -0
      Emacs/core-settings.el
  3. +18
    -0
      Emacs/keybinds.el
  4. +2
    -0
      Emacs/org-customizations.el
  5. +8
    -0
      Emacs/org-jira-customizations.el
  6. +1
    -0
      Emacs/packages.el
  7. +23
    -4
      Emacs/visual-late.el

+ 5
- 5
Emacs/clipboard.el View File

@ -58,16 +58,16 @@
(unless macoy-multiple-cursors-buffers
(call-interactively 'macoy-simpleclip-paste))
(when macoy-multiple-cursors-buffers
(save-excursion
(if macoy-clipboard-no-selection-line-paste
(progn
(if macoy-clipboard-no-selection-line-paste
(progn
(save-excursion
(back-to-indentation)
(newline)
(call-interactively 'indent-for-tab-command)
(previous-line)
(insert (nth macoy-mc-buffer-index macoy-multiple-cursors-buffers))
(call-interactively 'indent-for-tab-command))
(insert (nth macoy-mc-buffer-index macoy-multiple-cursors-buffers))))
(call-interactively 'indent-for-tab-command)))
(insert (nth macoy-mc-buffer-index macoy-multiple-cursors-buffers)))
;; Set up next cursor buffer index
;; Ensure we don't go out of range of the buffers
;; Sublime's behavior is to just paste all buffers at all marks, so our solution is different here


+ 11
- 0
Emacs/core-settings.el View File

@ -121,6 +121,10 @@
(setq ido-everywhere t)
;; No really, do ido everywhere
(when (require 'ido-completing-read+)
(ido-ubiquitous-mode 1))
;; Use ido for recentf file selection
;; From https://masteringemacs.org/article/find-files-faster-recent-files-package
(defun ido-recentf-open ()
@ -179,3 +183,10 @@
(if default-directory
(browse-url-of-file (expand-file-name default-directory))
(error "No `default-directory' to open")))
;; Open marked path
(defun macoy-open-marked-path-file ()
"Open the path in region."
(interactive)
(when (use-region-p)
(find-file (buffer-substring (region-beginning) (region-end)))))

+ 18
- 0
Emacs/keybinds.el View File

@ -145,6 +145,20 @@
(define-key occur-mode-map (kbd "p") 'occur-prev)
;; Move to beginning/end of function
;; TODO: This is a little too disorienting. It should only recenter if the line
;; is near the bottom or top (i.e. the function scrolled the window, losing your place)
(defun macoy-beginning-of-defun-and-recenter ()
(interactive)
(call-interactively 'beginning-of-defun)
(recenter))
(defun macoy-end-of-defun-and-recenter ()
(interactive)
(call-interactively 'end-of-defun)
(recenter))
;; (global-set-key (kbd "M-<up>") 'macoy-beginning-of-defun-and-recenter)
;; (global-set-key (kbd "M-<down>") 'macoy-end-of-defun-and-recenter)
;; (global-set-key (kbd "C-<prior>") 'macoy-beginning-of-defun-and-recenter)
;; (global-set-key (kbd "C-<next>") 'macoy-end-of-defun-and-recenter)
(global-set-key (kbd "M-<up>") 'beginning-of-defun)
(global-set-key (kbd "M-<down>") 'end-of-defun)
(global-set-key (kbd "C-<prior>") 'beginning-of-defun)
@ -200,6 +214,10 @@
(define-key reb-mode-map (kbd "C-<down>") 'reb-next-match)
)
;; Saving this for later. The weird syntax is because C-m is normally non-printable line feed
;; This doesn't actually work!
;; (global-set-key [?\C-m] 'newline)
;;
;; Make bindings work with org-mode
;;


+ 2
- 0
Emacs/org-customizations.el View File

@ -61,11 +61,13 @@
(when (string-equal (user-login-name) "macoy")
(setq macoy-org-dir "~/Dropbox/Org/")
(setq org-agenda-files (list (concat macoy-org-dir "1_Calendar.org")
(concat macoy-org-dir "JapaneseLessons.org")
(concat macoy-org-dir "0_Dump.org"))))
(when (string-equal (user-login-name) "mmadson")
(setq macoy-org-dir "C:/Users/mmadson/Dropbox/Org/")
(setq org-agenda-files (list (concat macoy-org-dir "1_Calendar.org")
(concat macoy-org-dir "JapaneseLessons.org")
(concat macoy-org-dir "0_Dump.org"))))
(when macoy-org-dir


+ 8
- 0
Emacs/org-jira-customizations.el View File

@ -7,6 +7,10 @@
(when (require 'org-jira)
(setq jiralib-url "http://jira:8080")
;; This doesn't fix the issue with org-jira-progress-issue. What made the required things?
;; (when (require 'ido-completing-read+)
;; (add-to-list 'ido-cr+-function-blacklist 'org-jira-progress-issue))
; Debug commands
;; (setq org-jira-verbosity 'debug)
;; (setq request-log-level 'debug)
@ -19,11 +23,14 @@
(files--ensure-directory org-jira-working-dir)
;; Overload this function to work with lower permissions (i.e. not set reporter)
;; (TODO) We'll also add labels, which weren't in the original for some reason
;; Need to do something like org-jira-build-components-list
(defun org-jira-update-issue-details (issue-id filename &rest rest)
"Update the details of issue ISSUE-ID in FILENAME. REST will contain optional input."
(ensure-on-issue-id-with-filename issue-id filename
;; Set up a bunch of values from the org content
(let* ((org-issue-components (org-jira-get-issue-val-from-org 'components))
;; (org-issue-labels (org-jira-get-issue-val-from-org 'labels))
(org-issue-description (s-trim (org-jira-get-issue-val-from-org 'description)))
(org-issue-priority (org-jira-get-issue-val-from-org 'priority))
(org-issue-type (org-jira-get-issue-val-from-org 'type))
@ -48,6 +55,7 @@
(or (org-jira-build-components-list
project-components
org-issue-components) []))
;; (cons 'labels org-issue-labels)
(cons 'priority (org-jira-get-id-name-alist org-issue-priority
(jiralib-get-priorities)))
(cons 'description org-issue-description)


+ 1
- 0
Emacs/packages.el View File

@ -39,6 +39,7 @@
expand-region
flx-ido
ido-vertical-mode
ido-completing-read+
ivy
ivy-xref
iy-go-to-char


+ 23
- 4
Emacs/visual-late.el View File

@ -93,12 +93,12 @@
(set-face-background 'svn-mark-face (face-background 'region))
)
;; TODO: Colors to differentiate between groups
;; TODO: Colors to differentiate between groups; foregrounds
(when (require 're-builder)
(set-face-background 'reb-match-0 (face-background 'region))
(set-face-background 'reb-match-1 (face-background 'region))
(set-face-background 'reb-match-2 (face-background 'region))
(set-face-background 'reb-match-3 (face-background 'region))
(set-face-background 'reb-match-1 "#c15759")
(set-face-background 'reb-match-2 "#fbbd5c")
(set-face-background 'reb-match-3 "#ff605d")
)
;; Make sure diff-mode colors are theme-appropriate:
@ -136,6 +136,25 @@
:background "#381e1e")
)
;; Get rid of the strange light gray background
(when (require 'vc-annotate)
;; (setq 'vc-annotate-background "#55")
;; (set-face-attribute 'vc-annotate-face-7CB8BB nil :background nil)
;; (set-face-attribute 'vc-annotate-face-8CD0D3 nil :background nil)
;; (set-face-attribute 'vc-annotate-face-8FB28F nil :background nil)
;; (set-face-attribute 'vc-annotate-face-93E0E3 nil :background nil)
;; (set-face-attribute 'vc-annotate-face-94BFF3 nil :background nil)
;; (set-face-attribute 'vc-annotate-face-9FC59F nil :background nil)
;; (set-face-attribute 'vc-annotate-face-AFD8AF nil :background nil)
;; (set-face-attribute 'vc-annotate-face-BC8383 nil :background nil)
;; (set-face-attribute 'vc-annotate-face-BFEBBF nil :background nil)
;; (set-face-attribute 'vc-annotate-face-CC9393 nil :background nil)
;; (set-face-attribute 'vc-annotate-face-D0BF8F nil :background nil)
;; (set-face-attribute 'vc-annotate-face-DC8CC3 nil :background nil)
;; (set-face-attribute 'vc-annotate-face-DFAF8F nil :background nil)
;; (set-face-attribute 'vc-annotate-face-F0DFAF nil :background nil)
)
;; Org faces customization
(when (require 'org-faces)
(set-face-foreground 'org-agenda-clocking (face-foreground 'region))


Loading…
Cancel
Save