diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-01-29 23:47:14 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-01-29 23:47:14 -0500 |
commit | 4495692a7f55c85ff2b51b4acc6a60028aacded6 (patch) | |
tree | b6c7d321e25adff29f49ab4cd444880c71a8dd3f /lisp | |
parent | 8654c7460538ea580bc6c80cb15f93ae14cadae1 (diff) | |
download | emacs.d-4495692a7f55c85ff2b51b4acc6a60028aacded6.tar.gz |
Split init-buffile.el
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-buffers.el | 25 | ||||
-rw-r--r-- | lisp/init-files.el (renamed from lisp/init-buffile.el) | 26 | ||||
-rw-r--r-- | lisp/init-org.el | 2 |
3 files changed, 27 insertions, 26 deletions
diff --git a/lisp/init-buffers.el b/lisp/init-buffers.el new file mode 100644 index 0000000..afdfe71 --- /dev/null +++ b/lisp/init-buffers.el @@ -0,0 +1,25 @@ + +(require 'uniquify) + +(setq uniquify-buffer-name-style 'forward) + +(setq ibuffer-expert t + ibuffer-restore-window-config-on-quit t + ibuffer-show-empty-filter-groups nil) + +(defun km/save-and-kill-buffer () + "Save current buffer and then kill it." + (interactive) + (save-buffer) + (kill-this-buffer)) + +(global-set-key (kbd "C-x K") 'kill-buffer-and-window) + +(key-chord-define-global ",d" 'km/save-and-kill-buffer) +(key-chord-define-global ",s" 'save-buffer) +(key-chord-define-global ",q" 'kill-this-buffer) + +;; Replace `list-buffers' with ibuffer. +(global-set-key (kbd "C-x C-b") 'ibuffer) + +(provide 'init-buffers) diff --git a/lisp/init-buffile.el b/lisp/init-files.el index 5ec3054..ced1373 100644 --- a/lisp/init-buffile.el +++ b/lisp/init-files.el @@ -1,11 +1,8 @@ -;;; Files and buffers (require 'uniquify) (setq require-final-newline t) -(setq uniquify-buffer-name-style 'forward) - (defun km/rename-current-buffer-file () "Rename current buffer and file it is visiting." (interactive) @@ -42,20 +39,10 @@ (setq file (concat "/sudo:root@localhost:" file))) (find-file file))) -(defun km/save-and-kill-buffer () - "Save current buffer and then kill it." - (interactive) - (save-buffer) - (kill-this-buffer)) - (global-set-key (kbd "C-x C-r") 'km/rename-current-buffer-file) (global-set-key (kbd "C-x F") 'km/find-file-as-root) -(global-set-key (kbd "C-x K") 'kill-buffer-and-window) -(key-chord-define-global ",d" 'km/save-and-kill-buffer) (key-chord-define-global ",f" 'find-file) -(key-chord-define-global ",s" 'save-buffer) -(key-chord-define-global ",q" 'kill-this-buffer) (define-key ctl-x-4-map "v" 'view-file-other-window) @@ -96,17 +83,6 @@ entering `ch' is equivalent to `*.[ch]'.") (define-key km/file-search-map "z" 'zrgrep) -;;; Ibuffer - -(setq ibuffer-expert t - ibuffer-restore-window-config-on-quit t - ibuffer-show-empty-filter-groups nil) - -;; Replace `list-buffers' with ibuffer. -(global-set-key (kbd "C-x C-b") 'ibuffer) - - - ;;; Recent files (setq recentf-max-menu-items 15 @@ -183,4 +159,4 @@ With prefix ERASE, delete contents of buffer." (global-set-key (kbd "C-c s") 'km/scratch-find-file) (define-key ctl-x-4-map "s" 'km/scratch-find-file-other-window) -(provide 'init-buffile) +(provide 'init-files) diff --git a/lisp/init-org.el b/lisp/init-org.el index 7a1b769..c033779 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -522,7 +522,7 @@ global value. A numeric prefix sets MAXLEVEL (defaults to 2)." (interactive) (org-open-file (km/read-recent-file))) -(after 'init-buffile +(after 'init-files (define-key km/file-map "a" 'km/org-open-annex-file) (define-key km/file-map "o" 'km/org-open-file) (define-key km/file-map "p" 'km/org-open-file-at-point) |