diff options
author | Franck Cuny <franck@fcuny.net> | 2023-06-01 19:35:59 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-06-01 19:35:59 -0700 |
commit | a187752c824b47052d33d3bc12749b5a7d2e8191 (patch) | |
tree | d939397496dcae8a7634a93b159fab57ee1752ec /emacs/custom/my-git.el | |
parent | elfeed: add more feeds (diff) | |
download | emacs.d-a187752c824b47052d33d3bc12749b5a7d2e8191.tar.gz |
🤡
Change-Id: I06b104d79deac199f9cd9cdae705e333d23cc852
Diffstat (limited to '')
-rw-r--r-- | emacs/custom/my-git.el | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/emacs/custom/my-git.el b/emacs/custom/my-git.el deleted file mode 100644 index 2270f91..0000000 --- a/emacs/custom/my-git.el +++ /dev/null @@ -1,50 +0,0 @@ -;;; my-git --- configures git for emacs -*- lexical-binding: t -*- - -;;; Commentary: - -;;; Code: - -(require 'magit) -(require 'git-link) - -;;; settings -(setq vc-follow-symlinks t) - -;; we're not barbarians -(setq git-commit-summary-max-length 70) - -;; open the link in the browser -(setq git-link-open-in-browser 't) - -;; I prefer to have the status buffer in full frame -(setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1) - -;; expand a number of sections with magit -(add-to-list 'magit-section-initial-visibility-alist '(untracked . show)) -(add-to-list 'magit-section-initial-visibility-alist '(unstaged . show)) -(add-to-list 'magit-section-initial-visibility-alist '(unpulled . show)) -(add-to-list 'magit-section-initial-visibility-alist '(unpushed . show)) - -(add-to-list 'auto-mode-alist '("\\.gitconfig\\'" . gitconfig-mode)) -(add-to-list 'auto-mode-alist '("\\.git/config\\'" . gitconfig-mode)) -(add-to-list 'auto-mode-alist '("\\.gitmodules\\'" . gitconfig-mode)) -(add-to-list 'auto-mode-alist '("\\.gitignore\\'" . gitconfig-mode)) -(add-to-list 'auto-mode-alist '("\\.dockerignore\\'" . gitconfig-mode)) -(add-to-list 'auto-mode-alist '("\\.gitattributes\\'" . gitattributes-mode)) - -;;; bindings -(global-set-key (kbd "C-x g") 'magit-status) -(global-set-key (kbd "C-c g l") 'git-link) -(global-set-key (kbd "C-c g c") 'git-link-commit) - -;;; hooks -(defun my/git-commit-auto-fill () - "Ensures that the commit body does not exceed 72 characters." - (setq-local fill-column 72) - (setq-local comment-auto-fill-only-comments nil)) - -(add-hook 'git-commit-mode-hook 'my/git-commit-auto-fill) - -(provide 'my-git) - -;;; my-git.el ends here |