From f74f92d0925032697fff2745371c08763fa89a90 Mon Sep 17 00:00:00 2001 From: "Matthew L. Fidler" Date: Wed, 2 Jul 2014 12:45:11 -0500 Subject: [PATCH] Use ergoemacs-mode; Can now use colemak --- .gitmodules | 3 + bundles/ergonomic/bundle.el | 438 ++++++++++++++++++------------------ lib/bundles/framework.el | 21 -- lib/perspective.el | 11 - vendor/ergoemacs-mode | 1 + 5 files changed, 223 insertions(+), 251 deletions(-) create mode 160000 vendor/ergoemacs-mode diff --git a/.gitmodules b/.gitmodules index 9071d30..3c49989 100644 --- a/.gitmodules +++ b/.gitmodules @@ -129,3 +129,6 @@ [submodule "vendor/rbenv"] path = vendor/rbenv url = https://github.com/senny/rbenv.el.git +[submodule "vendor/ergoemacs-mode"] + path = vendor/ergoemacs-mode + url = https://github.com/ergoemacs/ergoemacs-mode.git diff --git a/bundles/ergonomic/bundle.el b/bundles/ergonomic/bundle.el index 42cb0c6..7c13d9c 100644 --- a/bundles/ergonomic/bundle.el +++ b/bundles/ergonomic/bundle.el @@ -3,7 +3,9 @@ ;;;; ------------------------------------- ;;;; Bundle (cabbage-load-bundle-dependencies "ergonomic" '("enlarge")) +(cabbage-vendor 'ergoemacs-mode) +(require 'ergoemacs-mode) (defun move-cursor-next-pane () "Move cursor to the next pane." (interactive) @@ -14,222 +16,220 @@ (interactive) (other-window -1)) - -(global-unset-key (kbd "C-b")) ; backward-char -(global-unset-key (kbd "C-f")) ; forward-char -(global-unset-key (kbd "C-p")) ; previous-line -(global-unset-key (kbd "C-n")) ; next-line -(global-unset-key (kbd "C-M-i")) -(cabbage-global-set-key (kbd "M-j") 'backward-char) -(cabbage-global-set-key (kbd "M-l") 'forward-char) -(cabbage-global-set-key (kbd "M-i") 'previous-line) -(cabbage-global-set-key (kbd "M-I") 'scroll-down) -(cabbage-global-set-key (kbd "M-C-i") 'scroll-down) -(cabbage-global-set-key (kbd "M-k") 'next-line) -(cabbage-global-set-key (kbd "M-K") 'scroll-up) -(cabbage-global-set-key (kbd "M-C-k") 'scroll-up) -(cabbage-global-set-key (kbd "M-L") 'end-of-line) -(cabbage-global-set-key (kbd "M-C-l") 'end-of-line) -(cabbage-global-set-key (kbd "M-J") 'beginning-of-line) -(cabbage-global-set-key (kbd "M-C-j") 'beginning-of-line) - -(global-unset-key (kbd "M-b")) ; backward-word -(global-unset-key (kbd "M-f")) ; forward-word -(cabbage-global-set-key (kbd "M-u") 'backward-word) -(cabbage-global-set-key (kbd "M-o") 'forward-word) -(cabbage-global-set-key (kbd "M-U") 'backward-paragraph) -(cabbage-global-set-key (kbd "M-O") 'forward-paragraph) -(cabbage-global-set-key (kbd "M-C-o") 'forward-paragraph) -(cabbage-global-set-key (kbd "M-C-u") 'backward-paragraph) -(cabbage-global-set-key (kbd "M-b") 'pop-to-mark-command) - -(global-unset-key (kbd "C-")) ; backward-kill-word -(global-unset-key (kbd "M-d")) ; kill-word - -(global-unset-key (kbd "C-d")) ; delete-char -(cabbage-global-set-key (kbd "M-d") 'delete-backward-char) -(cabbage-global-set-key (kbd "M-f") 'delete-char) -(cabbage-global-set-key (kbd "M-D") 'backward-kill-word) -(cabbage-global-set-key (kbd "M-F") 'kill-word) -(cabbage-global-set-key (kbd "") 'delete-char) - -(global-unset-key (kbd "M-<")) ; beginning-of-buffer -(global-unset-key (kbd "M->")) ; end-of-buffer -(cabbage-global-set-key (kbd "M-h") 'beginning-of-buffer) -(cabbage-global-set-key (kbd "M-H") 'end-of-buffer) -(cabbage-global-set-key (kbd "M-RET") 'cabbage-next-line) - -(global-unset-key (kbd "C-x 1")) ; delete-other-windows -(global-unset-key (kbd "C-x 0")) ; delete-window -(cabbage-global-set-key (kbd "M-1") 'cabbage-enlargement-enlarge) -(cabbage-global-set-key (kbd "M-C-1") 'cabbage-enlargement-restore) -(cabbage-global-set-key (kbd "M-0") 'delete-window) -(cabbage-global-set-key (kbd "M-2") 'split-window-vertically) -(cabbage-global-set-key (kbd "M-3") 'split-window-horizontally) -(cabbage-global-set-key (kbd "M-4") 'balance-windows) -(cabbage-global-set-key (kbd "M-5") 'delete-other-windows) -(cabbage-global-set-key (kbd "M-+") 'balance-windows) - -(global-unset-key (kbd "M-x")) ; execute-extended-command -(cabbage-global-set-key (kbd "M-a") 'execute-extended-command) -(cabbage-global-set-key (kbd "M-q") 'shell-command) -(cabbage-global-set-key (kbd "M-e") 'cabbage-testing-execute-test) - - -(global-unset-key (kbd "C-d")) -(global-unset-key (kbd "C-w")) -(global-unset-key (kbd "C-s")) -(global-unset-key (kbd "C-a")) -(cabbage-global-set-key (kbd "C-d") 'windmove-right) -(cabbage-global-set-key (kbd "C-s") 'windmove-down) -(cabbage-global-set-key (kbd "C-a") 'windmove-left) -(cabbage-global-set-key (kbd "C-w") 'windmove-up) -(cabbage-global-set-key (kbd "M-s") 'move-cursor-next-pane) -(cabbage-global-set-key (kbd "M-S") 'move-cursor-previous-pane) - -(global-unset-key (kbd "C-/")) ; undo -(global-unset-key (kbd "C-_")) ; undo -(cabbage-global-set-key (kbd "M-z") 'undo) - -(cabbage-global-set-key (kbd "M-SPC") 'set-mark-command) -(cabbage-global-set-key (kbd "M-S-SPC") 'mark-paragraph) - -(global-unset-key (kbd "M-w")) ; kill-ring-save -(global-unset-key (kbd "C-y")) ; yank -(global-unset-key (kbd "M-y")) ; yank-pop -(global-unset-key (kbd "C-r")) ; yank-pop -(cabbage-global-set-key (kbd "M-x") 'kill-region) -(cabbage-global-set-key (kbd "M-c") 'kill-ring-save) -(cabbage-global-set-key (kbd "M-v") 'yank) -(cabbage-global-set-key (kbd "M-V") 'yank-pop) -(cabbage-global-set-key (kbd "C-r d") 'kill-rectangle) - -(global-unset-key (kbd "C-x C-f")) ; find-file -(global-unset-key (kbd "C-x h")) ; mark-whole-buffer -(global-unset-key (kbd "C-x C-w")) ; write-file -(cabbage-global-set-key (kbd "C-o") 'find-file) -(cabbage-global-set-key (kbd "C-S-n") 'write-file) -(cabbage-global-set-key (kbd "C-S-a") 'mark-whole-buffer) - -;; Help should search more than just commands -(cabbage-global-set-key (kbd "C-h a") 'apropos) - -;; general -(cabbage-global-set-key (kbd "C-c e") 'eval-and-replace) -(cabbage-global-set-key (kbd "C-x C-m") 'execute-extended-command) -(cabbage-global-set-key (kbd "C-c C-m") 'execute-extended-command) -(cabbage-global-set-key (kbd "M-r") 'replace-string) -(cabbage-global-set-key [C-return] 'cabbage-duplicate-line) -(cabbage-global-set-key (kbd "C-$") 'cabbage-kill-buffer) -(cabbage-global-set-key (kbd "C-c i") 'indent-buffer) -(cabbage-global-set-key (kbd "C-c n") 'cabbage-cleanup-buffer) -(cabbage-global-set-key (kbd "C-x C-b") 'ibuffer) - -(cabbage-global-set-key (kbd "C-c C-k") 'cabbage-comment-or-uncomment-region-or-line) -(cabbage-global-set-key (kbd "C-c k") 'kill-compilation) -(cabbage-global-set-key (kbd "C-c w") 'remove-trailing-whitespace-mode) - -;;;; Searching - -;; Use regex searches by default. -(global-unset-key (kbd "C-M-r")) ;; isearch-backwards -(cabbage-global-set-key (kbd "C-f") 'isearch-forward-regexp) -(cabbage-global-set-key (kbd "C-*") 'isearch-forward-at-point) - -;; File finding -(cabbage-global-set-key (kbd "C-x M-f") 'ido-find-file-other-window) -(cabbage-global-set-key (kbd "C-c r") 'revert-buffer) - -;;;; isearch -(define-key isearch-mode-map (kbd "M-s") 'move-cursor-next-pane) -(define-key isearch-mode-map (kbd "M-v") 'isearch-yank-kill) -(define-key isearch-mode-map (kbd "M-w") 'isearch-query-replace) -(define-key isearch-mode-map (kbd "M-o") 'isearch-yank-word) -(define-key isearch-mode-map (kbd "M-l") 'isearch-yank-char) -(define-key isearch-mode-map (kbd "M-j") 'isearch-delete-char) -(define-key isearch-mode-map (kbd "M-u") 'isearch-delete-char) -(define-key isearch-mode-map (kbd "C-f") 'isearch-repeat-forward) -;; TODO: find a suitable binding to use the search ring -;; (define-key isearch-mode-map (kbd "C-i") 'isearch-ring-retreat) -;; (define-key isearch-mode-map (kbd "C-k") 'isearch-ring-advance) - -;;;; Global bindings for cabbage bundles - -;; rect-mark bundle bindings -(when (cabbage-bundle-active-p 'rect-mark) - (cabbage-global-set-key (kbd "C-x r M-SPC") 'rm-set-mark) - (cabbage-global-set-key (kbd "M-x") 'cabbage-kill-region-or-rm-kill-region-executor) - (cabbage-global-set-key (kbd "M-c") 'cabbage-kill-ring-save-or-rm-kill-ring-save-executor) - (cabbage-global-set-key (kbd "C-x r M-r") 'cabbage-replace-replace-string) - (cabbage-global-set-key (kbd "C-x r s") 'string-rectangle) - (cabbage-global-set-key (kbd "C-x r ") 'rm-mouse-drag-region)) - -;; irc bundle bindings -(when (cabbage-bundle-active-p 'irc) - (cabbage-global-set-key (kbd "C-p i") 'cabbage-erc)) - -;; jabber bundle bindings -(when (cabbage-bundle-active-p 'jabber) - (cabbage-global-set-key (kbd "C-p j") 'cabbage-jabber)) - -;; plone bundle bindings -(when (cabbage-bundle-active-p 'plone) - (cabbage-global-set-key (kbd "C-c f c") 'cabbage-plone-find-changelog-make-entry) - (cabbage-global-set-key (kbd "M-T") 'cabbage-plone-find-file-in-package) - (cabbage-global-set-key (kbd "C-p b") 'cabbage-plone-ido-find-buildout) - (cabbage-global-set-key (kbd "C-c f r") 'cabbage-plone-reload-code) - (cabbage-global-set-key (kbd "C-c f f") 'cabbage-plone-run) - (cabbage-global-set-key (kbd "C-c f t") 'cabbage-plone-tests) - (cabbage-global-set-key (kbd "C-c f p") 'cabbage-plone--pep8-package) - (cabbage-global-set-key (kbd "C-c f a") 'cabbage-plone-find-adapter-by-name) - (cabbage-global-set-key (kbd "C-c f A") 'cabbage-plone-find-adapter-by-providing-interface) - (cabbage-global-set-key (kbd "C-c f u") 'cabbage-plone-find-utility-by-name) - (cabbage-global-set-key (kbd "C-c f U") 'cabbage-plone-find-utility-by-providing-interface)) - -;; cabbage-developer bundle bindings -(when (cabbage-bundle-active-p 'cabbage-developer) - (cabbage-global-set-key (kbd "C-c p") 'cabbage-emdeveloper-find-cabbage-config) - (cabbage-global-set-key (kbd "C-p e") 'cabbage-emdeveloper-emacs-persp)) - -;; power-edit bundle bindings -(when (cabbage-bundle-active-p 'power-edit) - (cabbage-global-set-key (kbd "C-c SPC") 'ace-jump-mode) - (cabbage-global-set-key (kbd "M-") 'move-text-up) - (cabbage-global-set-key (kbd "C-M-i") 'move-text-up) - (cabbage-global-set-key (kbd "M-") 'move-text-down) - (cabbage-global-set-key (kbd "C-M-k") 'move-text-down) - (cabbage-global-set-key (kbd "M-") 'textmate-shift-right) - (cabbage-global-set-key (kbd "C-M-l") 'textmate-shift-right) - (cabbage-global-set-key (kbd "M-") 'textmate-shift-left) - (cabbage-global-set-key (kbd "C-M-j") 'textmate-shift-left)) - -;; accessibility bundle bindings -(when (cabbage-bundle-active-p 'accessibility) - (cabbage-global-set-key (kbd "") 'ns-toggle-fullscreen) - (cabbage-global-set-key (kbd "C-+") 'increase-font-size) - (cabbage-global-set-key (kbd "C--") 'decrease-font-size) - (cabbage-global-set-key (kbd "C-c C-w") 'whitespace-mode)) - -;; project bundle bindings -(when (cabbage-bundle-active-p 'project) - (cabbage-global-set-key (kbd "M-t") 'textmate-goto-file) - (cabbage-global-set-key (kbd "M-w") 'textmate-goto-symbol) - (cabbage-global-set-key (kbd "C-x p") 'cabbage-project-ido-find-project) - (cabbage-global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) - (cabbage-global-set-key (kbd "C->") 'mc/mark-next-like-this) - (cabbage-global-set-key (kbd "C-<") 'mc/mark-previous-like-this) - (cabbage-global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this) - (cabbage-global-set-key (kbd "C-x f") 'recentf-ido-find-file)) - -;; org bundle bindings -(when (cabbage-bundle-active-p 'org) - (cabbage-global-set-key (kbd "C-p o") 'cabbage-org-emacs-persp)) - -;; git bundle bindings -(when (cabbage-bundle-active-p 'git) - (cabbage-global-set-key (kbd "C-x g") 'magit-status)) - -;; completion bundle bindings -(when (cabbage-bundle-active-p 'completion) - (global-unset-key (kbd "M-a")) - (cabbage-global-set-key (kbd "M-a") 'smex)) +(ergoemacs-theme-component cabbage-alt-ctl () + "Meta+Ctl+ movement commands" + (global-set-key (kbd "M-C-i") 'scroll-down) + (global-set-key (kbd "M-C-k") 'scroll-up) + (global-set-key (kbd "M-C-l") 'end-of-line) + (global-set-key (kbd "M-C-j") 'beginning-of-line)) + +(ergoemacs-theme-component cabbage-move-paragraph () + "Move paragraph" + (global-set-key (kbd "M-U") 'backward-paragraph) + (global-set-key (kbd "M-O") 'forward-paragraph) + (global-set-key (kbd "M-C-o") 'forward-paragraph) + (global-set-key (kbd "M-C-u") 'backward-paragraph)) + +(ergoemacs-theme-component cabbage-pop-mark () + "Pop mark" + (global-set-key (kbd "M-b") 'pop-to-mark-command)) + +(ergoemacs-theme-component cabbage-kill-word-shifted + "Shifted Kill Word" + (global-set-key (kbd "M-D") 'backward-kill-word) + (global-set-key (kbd "M-F") 'kill-word)) + +(ergoemacs-theme-component cabbage-beginning-end-of-buffer () + "Beginning/End of buffer" + (global-set-key (kbd "M-h") 'beginning-of-buffer) + (global-set-key (kbd "M-H") 'end-of-buffer)) + +(ergoemacs-theme-component cabbage-switch () + "Switching windows" + (global-set-key (kbd "M-1") 'cabbage-enlargement-enlarge) + (global-set-key (kbd "M-C-1") 'cabbage-enlargement-restore) + (global-set-key (kbd "M-0") 'delete-window) + (global-set-key (kbd "M-2") 'split-window-vertically) + (global-set-key (kbd "M-3") 'split-window-horizontally) + (global-set-key (kbd "M-4") 'balance-windows) + (global-set-key (kbd "M-5") 'delete-other-windows) + (global-set-key (kbd "M-+") 'balance-windows)) + +(ergoemacs-theme-component cabbage-exec () + "Cabbage execute" + (global-unset-key (kbd "M-x")) ; execute-extended-command + (global-set-key (kbd "M-a") 'execute-extended-command) + (global-set-key (kbd "M-q") 'shell-command) + (global-set-key (kbd "M-e") 'cabbage-testing-execute-test)) + +(ergoemacs-theme-component cabbage-windmove () + "Move Windows Cabbage Keys" + (global-unset-key (kbd "C-d")) + (global-unset-key (kbd "C-w")) + (global-unset-key (kbd "C-s")) + (global-unset-key (kbd "C-a")) + (global-set-key (kbd "C-d") 'windmove-right) + (global-set-key (kbd "C-s") 'windmove-down) + (global-set-key (kbd "C-a") 'windmove-left) + (global-set-key (kbd "C-w") 'windmove-up) + (global-set-key (kbd "M-s") 'move-cursor-next-pane) + (global-set-key (kbd "M-S") 'move-cursor-previous-pane)) + +(ergoemacs-theme-component cabbage-rectangle () + "Rectangles..." + (global-set-key (kbd "C-r d") 'kill-rectangle)) + +(ergoemacs-theme-component cabbage-fixed-keys () + "Fixed cabbage keys" + (global-set-key (kbd "C-S-n") 'write-file) + (global-set-key (kbd "C-S-a") 'mark-whole-buffer) + (global-set-key (kbd "C-c e") 'eval-and-replace) + (global-set-key (kbd "C-x C-m") 'execute-extended-command) + (global-set-key (kbd "C-c C-m") 'execute-extended-command) + (global-set-key (kbd "M-r") 'replace-string) + (global-set-key [C-return] 'cabbage-duplicate-line) + (global-set-key (kbd "C-$") 'cabbage-kill-buffer) + (global-set-key (kbd "C-c i") 'indent-buffer) + (global-set-key (kbd "C-c n") 'cabbage-cleanup-buffer) + (global-set-key (kbd "C-x C-b") 'ibuffer) + ;; Use remaps instead so that Alt+Enter will open directories under `ido-mode' + (global-set-key [remap electric-newline-and-maybe-indent] 'cabbage-next-line) + (global-set-key [remap newline-and-indent] 'cabbage-next-line) + + (global-set-key (kbd "C-c C-k") 'cabbage-comment-or-uncomment-region-or-line) + (global-set-key (kbd "C-c k") 'kill-compilation) + (global-set-key (kbd "C-c w") 'remove-trailing-whitespace-mode) + (global-set-key (kbd "C-*") 'isearch-forward-at-point) + (global-set-key (kbd "C-x M-f") 'ido-find-file-other-window) + (global-set-key (kbd "C-c r") 'revert-buffer) + ;; Note these keys do not require cabbage bundles to be active, just + ;; functions to be defined. + (global-set-key (kbd "C-x g") 'magit-status) + ;; Global bindings for cabbage bundles + + ;; rect-mark bundle bindings + (global-set-key (kbd "C-x r M-SPC") 'rm-set-mark) + (global-set-key (kbd "M-x") 'cabbage-kill-region-or-rm-kill-region-executor) + (global-set-key (kbd "M-c") 'cabbage-kill-ring-save-or-rm-kill-ring-save-executor) + (global-set-key (kbd "C-x r M-r") 'cabbage-replace-replace-string) + (global-set-key (kbd "C-x r s") 'string-rectangle) + (global-set-key (kbd "C-x r ") 'rm-mouse-drag-region) + + ;; irc bundle bindings + (global-set-key (kbd "C-p i") 'cabbage-erc) + + ;; jabber bundle bindings + (global-set-key (kbd "C-p j") 'cabbage-jabber) + + ;; plone bundle bindings + (global-set-key (kbd "C-c f c") 'cabbage-plone-find-changelog-make-entry) + (global-set-key (kbd "M-T") 'cabbage-plone-find-file-in-package) + (global-set-key (kbd "C-p b") 'cabbage-plone-ido-find-buildout) + (global-set-key (kbd "C-c f r") 'cabbage-plone-reload-code) + (global-set-key (kbd "C-c f f") 'cabbage-plone-run) + (global-set-key (kbd "C-c f t") 'cabbage-plone-tests) + (global-set-key (kbd "C-c f p") 'cabbage-plone--pep8-package) + (global-set-key (kbd "C-c f a") 'cabbage-plone-find-adapter-by-name) + (global-set-key (kbd "C-c f A") 'cabbage-plone-find-adapter-by-providing-interface) + (global-set-key (kbd "C-c f u") 'cabbage-plone-find-utility-by-name) + (global-set-key (kbd "C-c f U") 'cabbage-plone-find-utility-by-providing-interface) + + ;; cabbage-developer bundle bindings + (global-set-key (kbd "C-c p") 'cabbage-emdeveloper-find-cabbage-config) + (global-set-key (kbd "C-p e") 'cabbage-emdeveloper-emacs-persp) + + ;; power-edit bundle bindings + (global-set-key (kbd "C-c SPC") 'ace-jump-mode) + (global-set-key (kbd "M-") 'move-text-up) + (global-set-key (kbd "C-M-i") 'move-text-up) + (global-set-key (kbd "M-") 'move-text-down) + (global-set-key (kbd "C-M-k") 'move-text-down) + (global-set-key (kbd "M-") 'textmate-shift-right) + (global-set-key (kbd "C-M-l") 'textmate-shift-right) + (global-set-key (kbd "M-") 'textmate-shift-left) + (global-set-key (kbd "C-M-j") 'textmate-shift-left) + + ;; accessibility bundle bindings + (global-set-key (kbd "") 'ns-toggle-fullscreen) + (global-set-key (kbd "C-+") 'increase-font-size) + (global-set-key (kbd "C--") 'decrease-font-size) + (global-set-key (kbd "C-c C-w") 'whitespace-mode) + + ;; project bundle bindings + (global-set-key (kbd "M-t") 'textmate-goto-file) + (global-set-key (kbd "M-w") 'textmate-goto-symbol) + (global-set-key (kbd "C-x p") 'cabbage-project-ido-find-project) + (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) + (global-set-key (kbd "C->") 'mc/mark-next-like-this) + (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) + (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this) + (global-set-key (kbd "C-x f") 'recentf-ido-find-file) + + ;; org bundle bindings + (global-set-key (kbd "C-p o") 'cabbage-org-emacs-persp)) + +(ergoemacs-theme-component cabbage-perspective () + "Perspective Bindings" + (global-set-key (kbd "C-p s") 'persp-switch) + (global-set-key (kbd "C-p p") 'cabbage-persp-last) + (global-set-key (kbd "C-p d") 'persp-kill) + (global-set-key (kbd "C-p x") 'persp-kill) + (global-set-key (kbd "C-p m") 'cabbage-persp-main)) + +(ergoemacs-theme cabbage () + "`ergoemacs-mode' theme for cabbage." + :components '(copy + dired-to-wdired + execute + fixed-newline + help + kill-line + misc + move-bracket + move-buffer + move-char + ;; move-line + move-page + cabbage-move-paragraph + cabbage-pop-mark + cabbage-kill-word-shifted + cabbage-beginning-end-of-buffer + cabbage-switch + cabbage-exec + cabbage-rectangle + cabbage-fixed-keys + cabbage-perspective + move-word + search-reg ;; Regular Expression search + select-items + ;; switch + text-transform + ergoemacs-remaps + standard-vars) + :optional-on '(apps-punctuation + apps-apps + apps + cabbage-alt-ctl + backspace-del-seq + backspace-is-back + fn-keys + f2-edit + fixed-bold-italic + standard-fixed + ido-remaps + helm-remaps + multiple-cursors-remaps + quit + apps-swap + save-options-on-exit) + :optional-off '(guru no-backspace search + ergoemacs-banish-shift) + :options-menu '(("Menu/Apps Key" (apps apps-apps apps-punctuation)) + ("Function Keys" (fn-keys f2-edit)) + ("Remaps" (ido-remaps helm-remaps multiple-cursors-remaps)) + ("Extreme ErgoEmacs" (guru no-backspace ergoemacs-banish-shift)) + ("Standard Keys" (standard-fixed fixed-bold-italic quit)) + ("Keys during Key Sequence" (f2-edit apps-swap backspace-del-seq)))) + +(setq ergoemacs-theme "cabbage") +(ergoemacs-mode 1) diff --git a/lib/bundles/framework.el b/lib/bundles/framework.el index ad7050e..1096aab 100644 --- a/lib/bundles/framework.el +++ b/lib/bundles/framework.el @@ -1,4 +1,3 @@ -(defvar cabbage--globaly-bound-keys-alist '()) (defvar cabbage--deprecated-bundles '()) (defvar cabbage--protect-binding-modes '(tar-mode)) @@ -8,26 +7,6 @@ (defun cabbage-flymake-active-p () cabbage-use-flymake) -(defun cabbage-global-set-key (binding func) - (add-to-list 'cabbage--globaly-bound-keys-alist (cons binding func)) - (global-set-key binding func)) - -(defun cabbage-clear-local-bindings () - (interactive) - (unless (member major-mode cabbage--protect-binding-modes) - (dolist (binding cabbage--globaly-bound-keys-alist) - (local-unset-key (car binding))))) - -(add-hook 'after-change-major-mode-hook 'cabbage-clear-local-bindings) -(add-hook 'org-mode-hook 'cabbage-clear-local-bindings) -(add-hook 'org-agenda-mode-hook 'cabbage-clear-local-bindings) -(add-hook 'comint-mode-hook 'cabbage-clear-local-bindings) -(add-hook 'inf-ruby-mode-hook 'cabbage-clear-local-bindings) -(add-hook 'erlang-mode-hook 'cabbage-clear-local-bindings) -(add-hook 'diff-mode 'cabbage-clear-local-bindings) -(add-hook 'magit-mode 'cabbage-clear-local-bindings) -(add-hook 'html-mode-hook 'cabbage-clear-local-bindings) - (defun cabbage-lisp-buffer-p () (memql major-mode '(emacs-lisp-mode lisp-mode lisp-interaction-mode))) diff --git a/lib/perspective.el b/lib/perspective.el index ec1d32a..0913be7 100644 --- a/lib/perspective.el +++ b/lib/perspective.el @@ -27,15 +27,4 @@ Has no effect when `persp-show-modestring' is nil." (append '("[") (persp-intersperse (mapcar 'persp-format-name (persp-names)) "") '("]"))))) - -(defun cabbage-perspective-bindings () - (when (cabbage-bundle-active-p 'ergonomic) - (global-set-key (kbd "C-p s") 'persp-switch) - (global-set-key (kbd "C-p p") 'cabbage-persp-last) - (global-set-key (kbd "C-p d") 'persp-kill) - (global-set-key (kbd "C-p x") 'persp-kill) - (global-set-key (kbd "C-p m") 'cabbage-persp-main))) - -(add-hook 'cabbage-initialized-hook 'cabbage-perspective-bindings) - (persp-mode) diff --git a/vendor/ergoemacs-mode b/vendor/ergoemacs-mode new file mode 160000 index 0000000..f06e70f --- /dev/null +++ b/vendor/ergoemacs-mode @@ -0,0 +1 @@ +Subproject commit f06e70fec17bc577a6eabe7babe8f55a47d43c06