NARF v0.7.0

vcs:
+ +git-gutter to conf-modes; -git-gutter from evil-insert-state-exit
+ switch github-browse-file for browse-at-remote
+ fix <leader>ob; add <leader>d[./sr] vc bindings
+ vc-annotate bindings and initial state

Workgroups2 integration:
+ don't mess with buffers (speeds up emacs a lot!)
+ unicode numbers in display + single display function
+ remember workgroup uid instead (and smarter :tabrename)
+ clean up after wg update

Org-mode
+ give highlight precedence to links in org-mode
+ enable encryption
+ config clean up
+ use different font for org
+ exclude attachments in recentf
+ redo latex and inline-image config
+ add narf/org-open-notes
+ update file templates for org CRM

Mode-line
+ polish mode-line + decouple from spaceline-segments.el
+ refactor narf|spaceline-env-update
+ add macro-recording and buffer-size indicators to mode-line
+ python: '2>&1' in env-command
+ flycheck fringe indicator: change to arrow

Aesthetics
+ update narf-dark-theme
+ add narf-minibuffer-active face
+ change writing indicator in writing-mode

Misc
+ fix whitespace in display-startup-echo-area-message
+ reset fonts for more unicode characters
+ custom imenu entries + helm-imenu fontification
+ enable yascroll-bar in REPLs
+ reorganize my-commands.el
+ force quit iedit on ESC in normal mode
+ update snippets submodule
+ remove ido init (helm handles it all) [EXPERIMENTAL]
+ back to Terminus(TTF) font
+ popwin: update config for git-gutter and vc-diff windows
+ highlight :g[lobal] and :al[ign] matches
+ decouple narf/get-buffers+narf/get-all-buffers from wg-mess-with-buffer-list
+ fix narf/helm-buffers-dwim (add interactive form)
This commit is contained in:
Henrik Lissner 2015-12-11 16:51:04 -05:00
parent 8943bbc79f
commit aa26332d00
29 changed files with 691 additions and 421 deletions

View file

@ -39,7 +39,7 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
(defun narf/get-all-buffers ()
"Get all buffers across all workgroups. Depends on
`wg-mess-with-buffer-list'."
(if (and (featurep 'workgroups2) workgroups-mode)
(if (and (featurep 'workgroups2) workgroups-mode wg-mess-with-buffer-list)
(wg-buffer-list-emacs)
(buffer-list)))
@ -47,7 +47,7 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
(defun narf/get-buffers ()
"Get all buffers in the current workgroup. Depends on
`wg-mess-with-buffer-list'."
(buffer-list))
(wg-workgroup-associated-buffers (wg-current-workgroup)))
;;;###autoload
(defun narf/get-visible-buffers (&optional buffer-list)

View file

@ -39,16 +39,5 @@
(beginning-of-line))
(setq *linum-mdown-line* nil))))
;;;###autoload (autoload 'narf:align "defuns-editor" nil t)
(evil-define-operator narf:align (&optional beg end bang pattern)
(interactive "<r><!><//>")
(align-regexp
beg end
(concat "\\(\\s-*\\)"
(if bang
(regexp-quote pattern)
(rxt-pcre-to-elisp pattern)))
1 1))
(provide 'defuns-editor)
;;; defuns-editor.el ends here

View file

@ -82,6 +82,7 @@
(defun narf/helm-buffers-dwim (&optional all-p)
"Displays open buffers in current project. If ALL-P, then show all open
buffers."
(interactive)
(if (and (not all-p) (narf/project-p))
(helm-projectile-switch-to-buffer)
(helm-buffers-list)))

View file

@ -3,11 +3,11 @@
;;;###autoload
(defun narf|spaceline-env-update ()
(when narf--env-command
(let* ((command (format "cd '%s' && %s" (narf/project-root) narf--env-command))
(s (shell-command-to-string command)))
(setq narf--env-version (if (string-match "[ \t\n\r]+\\'" s)
(replace-match "" t t s)
s)))))
(let ((default-directory (narf/project-root)))
(let ((s (shell-command-to-string narf--env-command)))
(setq narf--env-version (if (string-match "[ \t\n\r]+\\'" s)
(replace-match "" t t s)
s))))))
(provide 'defuns-spaceline)
;;; defuns-spaceline.el ends here

View file

@ -14,7 +14,9 @@
(defun narf/wg-projectile-switch-project ()
(let ((workgroup-name (file-name-nondirectory (directory-file-name (narf/project-root)))))
(wg-create-workgroup workgroup-name t)
(helm-projectile-find-file)))
(helm-projectile-find-file)
;; TODO narf/workgroup-display?
))
;;;###autoload (autoload 'narf:save-session "defuns-workgroup" nil t)
(evil-define-command narf:save-session (&optional bang session-name)
@ -41,14 +43,23 @@
(wg-clone-workgroup (wg-current-workgroup) name)
(wg-create-workgroup name t))
(unless silent
(narf/workgroup-display (wg-previous-workgroup))))
(narf--workgroup-display (wg-previous-workgroup)
(format "Created %s" name)
'success)))
;;;###autoload (autoload 'narf:workgroup-rename "defuns-workgroup" nil t)
(evil-define-command narf:workgroup-rename (new-name)
(interactive "<a>")
(let ((wg (wg-current-workgroup)))
(wg-rename-workgroup new-name wg)
(add-to-list 'narf-wg-names wg)))
(evil-define-command narf:workgroup-rename (bang &optional new-name)
(interactive "<!><a>")
(let* ((wg (wg-current-workgroup))
(wg-uid (wg-workgroup-uid wg))
(old-name (wg-workgroup-name wg)))
(if bang
(setq narf-wg-names (delete wg-uid narf-wg-names))
(unless new-name
(user-error "You didn't enter in a name"))
(wg-rename-workgroup new-name wg)
(add-to-list 'narf-wg-names wg-uid)
(narf--workgroup-display wg (format "Renamed '%s'->'%s'" old-name new-name) 'success))))
;;;###autoload (autoload 'narf:workgroup-delete "defuns-workgroup" nil t)
(evil-define-command narf:workgroup-delete (&optional bang name)
@ -61,7 +72,7 @@
(if (eq wg current-wg)
(wg-kill-workgroup)
(wg-delete-workgroup wg))
(message "%s [Deleted %s]" (narf/workgroup-display nil t) wg-name))))
(narf--workgroup-display nil (format "Deleted %s" wg-name) 'success))))
;;;###autoload
(defun narf:kill-other-workgroups ()
@ -72,6 +83,24 @@
(unless (wg-current-workgroup-p w)
(wg-kill-workgroup w)))))
(defun narf--num-to-unicode (num)
"Return a nice unicode representation of a single-digit number STR."
(cl-case num
(1 "")
(2 "")
(3 "")
(4 "")
(5 "")
(6 "")
(7 "")
(8 "")
(9 "")
(0 "")))
(defun narf--workgroup-display (&optional suppress-update message message-face)
(message "%s%s" (narf/workgroup-display suppress-update t)
(propertize message 'face message-face)))
;;;###autoload
(defun narf/workgroup-display (&optional suppress-update return-p)
(interactive)
@ -83,7 +112,7 @@
(if (not workgroup) wg-nowg-string
(wg-element-display
workgroup
(format " (%d) %s " (1+ index) (wg-workgroup-name workgroup))
(format " %s %s " (narf--num-to-unicode (1+ index)) (wg-workgroup-name workgroup))
'wg-current-workgroup-p)))
(wg-workgroup-list))))
(if return-p
@ -99,23 +128,24 @@
(base (f-filename (buffer-file-name))))
(unless (string= base old-name)
(wg-rename-workgroup base wg)))))))
;; (advice-add 'select-window :after 'narf|workgroup-update-name)
;;;###autoload (autoload 'narf:switch-to-workgroup-left "defuns-workgroup" nil t)
(evil-define-command narf:switch-to-workgroup-left (count)
(interactive "<c>")
(narf/workgroup-update-names)
(if count
(wg-switch-to-workgroup-at-index (1- count))
(wg-switch-to-workgroup-left))
(narf/workgroup-display (wg-previous-workgroup)))
(narf/workgroup-display t))
;;;###autoload (autoload 'narf:switch-to-workgroup-right "defuns-workgroup" nil t)
(evil-define-command narf:switch-to-workgroup-right (count)
(interactive "<c>")
(narf/workgroup-update-names)
(if count
(wg-switch-to-workgroup-at-index (1- count))
(wg-switch-to-workgroup-right))
(narf/workgroup-display (wg-previous-workgroup)))
(narf/workgroup-display t))
;;;###autoload
(defun narf:switch-to-workgroup-at-index (index)