doomemacs/core/core-vcs.el

65 lines
2.3 KiB
EmacsLisp
Raw Normal View History

2015-06-15 09:05:52 +02:00
;;; core-vcs.el --- version control awareness
(use-package gitconfig-mode
2015-08-13 12:14:41 -04:00
:mode ("/\\.?git/?config$" "/\\.gitmodules$")
2015-12-10 16:15:09 -05:00
:init (add-hook! gitconfig-mode 'flyspell-mode))
2015-06-15 09:05:52 +02:00
(use-package gitignore-mode
2015-08-13 12:14:41 -04:00
:mode ("/\\.gitignore$"
"/\\.git/info/exclude$"
"/git/ignore$"))
2015-06-15 09:05:52 +02:00
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)
2015-12-11 16:51:04 -05:00
(use-package browse-at-remote
:defer t
2015-12-09 01:16:31 -05:00
:init
2015-12-23 03:45:38 -05:00
(evil-define-command narf:git-remote-browse (&optional bang file)
"Open the website for the current (or specified) version controlled FILE. If BANG,
then use hub to do it."
(interactive "<!><f>")
(if bang
(message "Url copied to clipboard: %s" (browse-at-remote/to-clipboard))
(browse-at-remote/browse))))
2015-12-09 01:16:31 -05:00
(use-package git-gutter
:commands (git-gutter-mode narf/vcs-next-hunk narf/vcs-prev-hunk
narf/vcs-show-hunk narf/vcs-stage-hunk narf/vcs-revert-hunk)
:init
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)
2015-12-11 16:51:04 -05:00
(add-hook! (text-mode prog-mode conf-mode) 'git-gutter-mode)
2015-12-09 01:16:31 -05:00
:config
(require 'git-gutter-fringe)
(defalias 'narf/vcs-next-hunk 'git-gutter:next-hunk)
(defalias 'narf/vcs-prev-hunk 'git-gutter:previous-hunk)
(defalias 'narf/vcs-show-hunk 'git-gutter:popup-hunk)
(defalias 'narf/vcs-stage-hunk 'git-gutter:stage-hunk)
(defalias 'narf/vcs-revert-hunk 'git-gutter:revert-hunk)
(define-fringe-bitmap 'git-gutter-fr:added
[240 240 240 240 240 240 240 240 240 240 240 240 240 240]
nil nil 'center)
(define-fringe-bitmap 'git-gutter-fr:modified
[240 240 240 240 240 240 240 240 240 240 240 240 240 240]
nil nil 'center)
(define-fringe-bitmap 'git-gutter-fr:deleted
[0 0 0 128 192 224 240 248]
nil nil 'center)
(advice-add 'evil-force-normal-state :after 'git-gutter)
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)
2015-12-11 16:51:04 -05:00
(add-hook! focus-in 'git-gutter:update-all-windows))
2015-12-09 01:16:31 -05:00
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)
2015-12-11 16:51:04 -05:00
(after! vc-annotate
(evil-set-initial-state 'vc-annotate-mode 'normal)
(evil-set-initial-state 'vc-git-log-view-mode 'normal)
(map! :map vc-annotate-mode-map
:n "q" 'kill-this-buffer
:n "d" 'vc-annotate-show-diff-revision-at-line
:n "D" 'vc-annotate-show-changeset-diff-revision-at-line
:n "SPC" 'vc-annotate-show-log-revision-at-line
:n "]]" 'vc-annotate-next-revision
:n "[[" 'vc-annotate-prev-revision
:n [tab] 'vc-annotate-toggle-annotation-visibility
:n "RET" 'vc-annotate-find-revision-at-line))
2015-06-15 09:05:52 +02:00
(provide 'core-vcs)
;;; core-vcs.el ends here