Browse Source

Update ibuffer and keybinds.

master
Taylor Bockman 2 years ago
parent
commit
b495d54f2d
  1. 4
      README.md
  2. 3
      elisp/keybinds.el
  3. 71
      elisp/modes/ibuffer-settings.el

4
README.md

@ -19,6 +19,10 @@ Emacs session quickly for tasks like mail (if you use a text-based mail editor).
Sometimes you have certain things that a library might require but you don't want committed to your dotfiles. This git
project will ignore `private.el`. You may put your private information in `~/.emacs.d/elisp/private.el` for it to be loaded.
## IBuffer
`ibuffer` has been configured to filter/folderize common things such as source code, magit, etc for easier management. To launch it, use `C-x C-b`.
## Markdown
For full use of the markdown mode you will need a markdown preprocessor installed such as pandoc or multimarkdown.

3
elisp/keybinds.el

@ -9,3 +9,6 @@
;; Allow arrow meta-arrow to move between windows.
(windmove-default-keybindings 'meta)
;; Force C-x C-b to ibuffer
(global-set-key (kbd "C-x C-b") 'ibuffer)

71
elisp/modes/ibuffer-settings.el

@ -3,56 +3,43 @@
;;; Commentary:
;;;
;;; Use C-x C-b to launch ibuffer.
;; Hide all buffers with an asterisk
(require 'ibuf-ext)
(add-to-list 'ibuffer-never-show-predicates "^\\*")
(setq ibuffer-saved-filter-groups
'(("default"
("Emacs Configuration" (or (filename . ".emacs.d")
(filename . "init.el")
(filename . "package.el")
(filename . "private.el")
(filename . "emacs.d")))
("Org" (or (mode . org-mode)
(filename . "OrgMode")))
("Magit" (name . "magit"))
("Help" (or (name . "\*Help\*")
(name . "\*Apropos\*")
(name . "\*info\*")))
("Dired" (mode . dired-mode))
;; Dev has groups for all languages you program in
("Dev" (or
(filename . ".c")
(filename . ".cpp")
(filename . ".hpp")
(filename . ".h")
(filename . ".java")
(filename . ".py")
(filename . ".lisp")
(filename . ".properties")
(filename . ".gradle")
(filename . ".am")
(filename . ".json")
(mode . yaml-mode))
)
("Text" (or (filename . ".csv")
(filename . ".tsv")
(filename . ".txt")
(filename . ".log")))
("Emacs" (or (name . "^\\*scratch\\*$")
(quote (("default"
("dired" (mode . dired-mode))
("perl" (mode . cperl-mode))
("lisp" (or (mode . lisp-mode)
(mode . emacs-lisp-mode)))
("python" (mode . python-mode))
("git" (mode . magit-mode))
("erc" (mode . erc-mode))
("planner" (or
(name . "^\\*Calendar\\*$")
(name . "^diary$")
(mode . muse-mode)))
("emacs" (or
(name . "^\\*scratch\\*$")
(name . "^\\*Messages\\*$")))
("Gnus" (or (mode . message-mode)
("svg" (name . "\\.svg")) ; group by file extension
("gnus" (or
(mode . message-mode)
(mode . bbdb-mode)
(mode . mail-mode)
(mode . gnus-group-mode)
(mode . gnus-summary-mode)
(mode . gnus-article-mode)
(name . "^\\.bbdb$")
(name . "^\\.newsrc-dribble")))
)))
;; Automatically keep buffers up to date and load the filter
(name . "^\\.newsrc-dribble")))))))
(add-hook 'ibuffer-mode-hook
'(lambda ()
(lambda ()
(ibuffer-auto-mode 1)
(ibuffer-switch-to-saved-filter-groups "default")))
;; Disable eager line numbering
(add-hook 'ibuffer-mode-hook 'nolinum)
(setq ibuffer-expert t)
(setq ibuffer-show-empty-filter-groups nil)
(add-hook 'ibuffer-mode-hook
(lambda ()
(ibuffer-switch-to-saved-filter-groups "default")))

Loading…
Cancel
Save