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)
99 lines
3.6 KiB
EmacsLisp
99 lines
3.6 KiB
EmacsLisp
;;; defuns-helm.el
|
|
;; see ../core-helm.el
|
|
|
|
;;;###autoload
|
|
(defun narf|projectile-invalidate-cache-maybe ()
|
|
(when (narf/project-p)
|
|
(projectile-invalidate-cache nil)))
|
|
|
|
;;;###autoload (autoload 'narf:helm-recentf "defuns-helm" nil t)
|
|
(evil-define-command narf:helm-recentf (&optional bang)
|
|
"Ex-mode interface for `helm-recentf' and `helm-projectile-recentf'. If
|
|
`bang', then `search' is interpreted as regexp."
|
|
:repeat nil
|
|
(interactive "<!>")
|
|
(if bang (helm-recentf) (helm-projectile-recentf)))
|
|
|
|
;; Ex-mode interface for `helm-ag'. If `bang', then `search' is interpreted as
|
|
;; regexp.
|
|
;;;###autoload (autoload 'narf:helm-ag-search "defuns-helm" nil t)
|
|
(evil-define-operator narf:helm-ag-search (beg end &optional search hidden-files-p pwd-p regex-p)
|
|
:type inclusive
|
|
:repeat nil
|
|
(interactive "<r><a><!>")
|
|
(require 'helm-ag)
|
|
(let* ((helm-ag--default-directory (if pwd-p default-directory (concat (narf/project-root) "/")))
|
|
(helm-ag-command-option (concat (unless regex-p "-Q ")
|
|
(if hidden-files-p "--hidden ")))
|
|
(input "")
|
|
(header-name (format "Search in %s" helm-ag--default-directory)))
|
|
(if search
|
|
(progn
|
|
(helm-attrset 'search-this-file nil helm-ag-source)
|
|
(setq helm-ag--last-query search))
|
|
(if (and beg end (/= beg (1- end)))
|
|
(setq input (buffer-substring-no-properties beg end))))
|
|
(helm-attrset 'name header-name helm-ag-source)
|
|
(helm :sources (if search helm-ag-source '(helm-source-do-ag))
|
|
:buffer "*helm-ag*"
|
|
:keymap helm-ag-map
|
|
:input input)))
|
|
|
|
;;;###autoload (autoload 'narf:helm-ag-regex-search "defuns-helm" nil t)
|
|
(evil-define-operator narf:helm-ag-regex-search (beg end &optional search bang)
|
|
:type inclusive :repeat nil
|
|
(interactive "<r><a><!>")
|
|
(narf:helm-ag-search beg end search bang nil t))
|
|
|
|
;;;###autoload (autoload 'narf:helm-ag-search-cwd "defuns-helm" nil t)
|
|
(evil-define-operator narf:helm-ag-search-cwd (beg end &optional search bang)
|
|
;; Ex-mode interface for `helm-do-ag'. If `bang', then `search' is interpreted
|
|
;; as regexp
|
|
:type inclusive :repeat nil
|
|
(interactive "<r><a><!>")
|
|
(narf:helm-ag-search beg end search bang t nil))
|
|
|
|
;;;###autoload (autoload 'narf:helm-ag-regex-search-cwd "defuns-helm" nil t)
|
|
(evil-define-operator narf:helm-ag-regex-search-cwd (beg end &optional search bang)
|
|
:type inclusive :repeat nil
|
|
(interactive "<r><a><!>")
|
|
(narf:helm-ag-search beg end search bang t t))
|
|
|
|
;; Ex-mode interface for `helm-swoop', `helm-multi-swoop-all' (if `bang'), or
|
|
;; `helm-css-scss' and `helm-css-scss-multi' (if `bang') if major-mode is
|
|
;; `scss-mode'
|
|
;;;###autoload (autoload 'narf:helm-swoop "defuns-helm" nil t)
|
|
(evil-define-command narf:helm-swoop (&optional search bang)
|
|
:repeat nil
|
|
(interactive "<a><!>")
|
|
(if bang (helm-multi-swoop-all search) (helm-swoop :$query search)))
|
|
|
|
;;;###autoload
|
|
(defun narf/helm-find-in-emacsd ()
|
|
(interactive)
|
|
(in! narf-emacs-dir (helm-projectile-find-file)))
|
|
|
|
;;;###autoload
|
|
(defun narf/helm-find-in-dotfiles ()
|
|
(interactive)
|
|
(in! (expand-file-name ".dotfiles" "~") (helm-projectile-find-file)))
|
|
|
|
;;;###autoload
|
|
(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)))
|
|
|
|
;;;###autoload
|
|
(defun narf/helm-org-find-files ()
|
|
(interactive)
|
|
(in! org-directory
|
|
(let ((helm-ff-skip-boring-files t))
|
|
(helm-find-files-1 org-directory))))
|
|
|
|
|
|
(provide 'defuns-helm)
|
|
;;; defuns-helm.el ends here
|