customizations are no more - they don't work particularly well for
something like Prelude
This commit is contained in:
parent
b3ffef226d
commit
4bc0350c47
13 changed files with 146 additions and 398 deletions
133
init.el
133
init.el
|
@ -33,10 +33,6 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defgroup prelude nil
|
|
||||||
"Emacs Prelude"
|
|
||||||
:group 'convenience)
|
|
||||||
|
|
||||||
;; On OS X Emacs doesn't use the shell PATH if it's not started from
|
;; On OS X Emacs doesn't use the shell PATH if it's not started from
|
||||||
;; the shell. If you're using homebrew modifying the PATH is essential.
|
;; the shell. If you're using homebrew modifying the PATH is essential.
|
||||||
(if (eq system-type 'darwin)
|
(if (eq system-type 'darwin)
|
||||||
|
@ -69,120 +65,23 @@ by Prelude.")
|
||||||
(require 'prelude-editor)
|
(require 'prelude-editor)
|
||||||
(require 'prelude-global-keybindings)
|
(require 'prelude-global-keybindings)
|
||||||
|
|
||||||
(defcustom prelude-c-module t
|
|
||||||
"Enable Prelude's C module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-clojure-module t
|
|
||||||
"Enable Prelude's Clojure module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-coffee-script-module t
|
|
||||||
"Enable Prelude's CoffeeScript module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-common-lisp-module t
|
|
||||||
"Enable Prelude's Common Lisp module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-emacs-lisp-module t
|
|
||||||
"Enable Prelude's Emacs Lisp module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-erc-module t
|
|
||||||
"Enable Prelude's ERC module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-haskell-module t
|
|
||||||
"Enable Prelude's Haskell module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-js-module t
|
|
||||||
"Enable Prelude's JavaScript module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-latex-module t
|
|
||||||
"Enable Prelude's LaTeX module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-markdown-module t
|
|
||||||
"Enable Prelude's Markdown module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-org-module t
|
|
||||||
"Enable Prelude's org-mode module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-perl-module t
|
|
||||||
"Enable Prelude's Perl module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-python-module t
|
|
||||||
"Enable Prelude's Python module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-ruby-module t
|
|
||||||
"Enable Prelude's Ruby module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-scheme-module t
|
|
||||||
"Enable Prelude's Scheme module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-xml-module t
|
|
||||||
"Enable Prelude's XML module."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
|
|
||||||
;; programming & markup languages support
|
;; programming & markup languages support
|
||||||
(when prelude-c-module
|
(require 'prelude-c)
|
||||||
(require 'prelude-c))
|
(require 'prelude-clojure)
|
||||||
(when prelude-clojure-module
|
(require 'prelude-coffee)
|
||||||
(require 'prelude-clojure))
|
(require 'prelude-common-lisp)
|
||||||
(when prelude-coffee-script-module
|
(require 'prelude-emacs-lisp)
|
||||||
(require 'prelude-coffee))
|
(require 'prelude-erc)
|
||||||
(when prelude-common-lisp-module
|
(require 'prelude-haskell)
|
||||||
(require 'prelude-common-lisp))
|
(require 'prelude-js)
|
||||||
(when prelude-emacs-lisp-module
|
(require 'prelude-latex)
|
||||||
(require 'prelude-emacs-lisp))
|
(require 'prelude-markdown)
|
||||||
(when prelude-erc-module
|
(require 'prelude-org)
|
||||||
(require 'prelude-erc))
|
(require 'prelude-perl)
|
||||||
(when prelude-haskell-module
|
(require 'prelude-python)
|
||||||
(require 'prelude-haskell))
|
(require 'prelude-ruby)
|
||||||
(when prelude-js-module
|
(require 'prelude-scheme)
|
||||||
(require 'prelude-js))
|
(require 'prelude-xml)
|
||||||
(when prelude-latex-module
|
|
||||||
(require 'prelude-latex))
|
|
||||||
(when prelude-markdown-module
|
|
||||||
(require 'prelude-markdown))
|
|
||||||
(when prelude-org-module
|
|
||||||
(require 'prelude-org))
|
|
||||||
(when prelude-perl-module
|
|
||||||
(require 'prelude-perl))
|
|
||||||
(when prelude-perl-module
|
|
||||||
(require 'prelude-python))
|
|
||||||
(when prelude-ruby-module
|
|
||||||
(require 'prelude-ruby))
|
|
||||||
(when prelude-scheme-module
|
|
||||||
(require 'prelude-scheme))
|
|
||||||
(when prelude-xml-module
|
|
||||||
(require 'prelude-xml))
|
|
||||||
|
|
||||||
;; load the personal settings (this includes `custom-file')
|
;; load the personal settings (this includes `custom-file')
|
||||||
(when (file-exists-p prelude-personal-dir)
|
(when (file-exists-p prelude-personal-dir)
|
||||||
|
|
|
@ -32,24 +32,13 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; customize
|
|
||||||
(defgroup c nil
|
|
||||||
"Emacs Prelude C programming support"
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-enable-c-hook t
|
|
||||||
"Enable Prelude's default C hook."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'c)
|
|
||||||
|
|
||||||
(defun prelude-c-coding-hook ()
|
(defun prelude-c-coding-hook ()
|
||||||
(setq c-basic-offset 4)
|
(setq c-basic-offset 4)
|
||||||
(prelude-coding-hook))
|
(prelude-coding-hook))
|
||||||
|
|
||||||
(when prelude-enable-c-hook
|
;; this will affect all modes derived from cc-mode, like
|
||||||
;; this will affect all modes derived from cc-mode, like
|
;; java-mode, php-mode, etc
|
||||||
;; java-mode, php-mode, etc
|
(add-hook 'c-mode-common-hook 'prelude-c-coding-hook)
|
||||||
(add-hook 'c-mode-common-hook 'prelude-c-coding-hook))
|
|
||||||
|
|
||||||
(provide 'prelude-c)
|
(provide 'prelude-c)
|
||||||
|
|
||||||
|
|
|
@ -32,16 +32,6 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; customize
|
|
||||||
(defgroup clojure nil
|
|
||||||
"Emacs Prelude Clojure programming support"
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-enable-clojure-hook t
|
|
||||||
"Enable Prelude's Clojure hook."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'clojure)
|
|
||||||
|
|
||||||
(require 'prelude-lisp)
|
(require 'prelude-lisp)
|
||||||
|
|
||||||
;; To start SLIME in your Clojure project:
|
;; To start SLIME in your Clojure project:
|
||||||
|
@ -49,8 +39,7 @@
|
||||||
;; 2. Invoke M-x clojure-jack-in from a project
|
;; 2. Invoke M-x clojure-jack-in from a project
|
||||||
(require 'clojure-mode)
|
(require 'clojure-mode)
|
||||||
|
|
||||||
(when prelude-enable-clojure-hook
|
(add-hook 'clojure-mode-hook 'prelude-lisp-coding-hook)
|
||||||
(add-hook 'clojure-mode-hook 'prelude-lisp-coding-hook))
|
|
||||||
|
|
||||||
(provide 'prelude-clojure)
|
(provide 'prelude-clojure)
|
||||||
|
|
||||||
|
|
|
@ -32,15 +32,6 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defgroup coffee nil
|
|
||||||
"Emacs Prelude CoffeeScript support"
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-enable-coffee-hook t
|
|
||||||
"Enable Prelude's CoffeeScript's hook"
|
|
||||||
:type 'boolean
|
|
||||||
:group 'coffee)
|
|
||||||
|
|
||||||
(require 'coffee-mode)
|
(require 'coffee-mode)
|
||||||
|
|
||||||
(defun prelude-coffee-mode-hook ()
|
(defun prelude-coffee-mode-hook ()
|
||||||
|
@ -73,8 +64,7 @@
|
||||||
(file-exists-p (coffee-compiled-file-name))
|
(file-exists-p (coffee-compiled-file-name))
|
||||||
(coffee-cos-mode t)))
|
(coffee-cos-mode t)))
|
||||||
|
|
||||||
(when prelude-enable-coffee-hook
|
(add-hook 'coffee-mode-hook 'prelude-coffee-mode-hook)
|
||||||
(add-hook 'coffee-mode-hook 'prelude-coffee-mode-hook))
|
|
||||||
|
|
||||||
(provide 'prelude-coffee)
|
(provide 'prelude-coffee)
|
||||||
|
|
||||||
|
|
|
@ -32,27 +32,6 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defgroup common-lisp nil
|
|
||||||
"Prelude's Common Lisp support"
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-start-slime-automatically t
|
|
||||||
"Start SLIME automatically the first time a .list file is opened."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'common-lisp)
|
|
||||||
|
|
||||||
(defcustom prelude-enable-common-lisp-hook t
|
|
||||||
"Enable Prelude's Common Lisp hook"
|
|
||||||
:type 'boolean
|
|
||||||
:group 'common-lisp)
|
|
||||||
|
|
||||||
(defcustom prelude-load-common-lisp-slime-automatically nil
|
|
||||||
"Load Common Lisp's SLIME by default. Setting this to `t' is not a
|
|
||||||
very good idea if you're programming on occasion in both Clojure and
|
|
||||||
Common Lisp."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'common-lisp)
|
|
||||||
|
|
||||||
(require 'prelude-lisp)
|
(require 'prelude-lisp)
|
||||||
|
|
||||||
;; the SBCL configuration file is in Common Lisp
|
;; the SBCL configuration file is in Common Lisp
|
||||||
|
@ -84,17 +63,15 @@ Common Lisp."
|
||||||
;; default to SBCL on Linux and Windows
|
;; default to SBCL on Linux and Windows
|
||||||
(setq slime-default-lisp 'sbcl))
|
(setq slime-default-lisp 'sbcl))
|
||||||
|
|
||||||
(when prelude-enable-common-lisp-hook
|
(add-hook 'lisp-mode-hook 'prelude-lisp-coding-hook)
|
||||||
(add-hook 'lisp-mode-hook 'prelude-lisp-coding-hook)
|
(add-hook 'slime-repl-mode-hook 'prelude-interactive-lisp-coding-hook)
|
||||||
(add-hook 'slime-repl-mode-hook 'prelude-interactive-lisp-coding-hook))
|
|
||||||
|
|
||||||
;; start slime automatically when we open a lisp file
|
;; start slime automatically when we open a lisp file
|
||||||
(defun prelude-start-slime ()
|
(defun prelude-start-slime ()
|
||||||
(unless (slime-connected-p)
|
(unless (slime-connected-p)
|
||||||
(save-excursion (slime))))
|
(save-excursion (slime))))
|
||||||
|
|
||||||
(when prelude-start-slime-automatically
|
(add-hook 'slime-mode-hook 'prelude-start-slime)
|
||||||
(add-hook 'slime-mode-hook 'prelude-start-slime))
|
|
||||||
|
|
||||||
;; Stop SLIME's REPL from grabbing DEL,
|
;; Stop SLIME's REPL from grabbing DEL,
|
||||||
;; which is annoying when backspacing over a '('
|
;; which is annoying when backspacing over a '('
|
||||||
|
|
|
@ -36,11 +36,6 @@
|
||||||
(require 'thingatpt)
|
(require 'thingatpt)
|
||||||
(require 'imenu)
|
(require 'imenu)
|
||||||
|
|
||||||
;; customization
|
|
||||||
(defgroup core nil
|
|
||||||
"Emacs Prelude core"
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defun prelude-add-subfolders-to-load-path (parent-dir)
|
(defun prelude-add-subfolders-to-load-path (parent-dir)
|
||||||
"Adds all first level `parent-dir' subdirs to the
|
"Adds all first level `parent-dir' subdirs to the
|
||||||
Emacs load path."
|
Emacs load path."
|
||||||
|
|
|
@ -32,15 +32,6 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defgroup emacs-lisp nil
|
|
||||||
"Prelude support for Emacs Lisp"
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-enable-emacs-lisp-hook t
|
|
||||||
"Enable Prelude's Emacs Lisp hook"
|
|
||||||
:type 'boolean
|
|
||||||
:group 'emacs-lisp)
|
|
||||||
|
|
||||||
(require 'prelude-lisp)
|
(require 'prelude-lisp)
|
||||||
|
|
||||||
(defun prelude-remove-elc-on-save ()
|
(defun prelude-remove-elc-on-save ()
|
||||||
|
@ -51,14 +42,18 @@
|
||||||
(if (file-exists-p (concat buffer-file-name "c"))
|
(if (file-exists-p (concat buffer-file-name "c"))
|
||||||
(delete-file (concat buffer-file-name "c"))))))
|
(delete-file (concat buffer-file-name "c"))))))
|
||||||
|
|
||||||
(when prelude-enable-emacs-lisp-hook
|
(defun prelude-emacs-lisp-mode-hook ()
|
||||||
(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
|
(turn-on-eldoc-mode)
|
||||||
(add-hook 'emacs-lisp-mode-hook 'prelude-remove-elc-on-save)
|
(prelude-remove-elc-on-save)
|
||||||
|
(prelude-lisp-coding-hook))
|
||||||
|
|
||||||
(add-hook 'emacs-lisp-mode-hook 'prelude-lisp-coding-hook)
|
(add-hook 'emacs-lisp-mode-hook 'prelude-emacs-lisp-mode-hook)
|
||||||
|
|
||||||
(add-hook 'ielm-mode-hook 'prelude-interactive-lisp-coding-hook)
|
(defun prelude-ielm-mode-hook ()
|
||||||
(add-hook 'ielm-mode-hook 'turn-on-eldoc-mode))
|
(prelude-interactive-lisp-coding-hook)
|
||||||
|
(turn-on-eldoc-mode))
|
||||||
|
|
||||||
|
(add-hook 'ielm-mode-hook 'prelude-ielm-mode-hook)
|
||||||
|
|
||||||
(define-key emacs-lisp-mode-map (kbd "M-.") 'find-function-at-point)
|
(define-key emacs-lisp-mode-map (kbd "M-.") 'find-function-at-point)
|
||||||
|
|
||||||
|
|
|
@ -32,135 +32,123 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defcustom prelude-enable-additional-keybindings t
|
;; You know, like Readline.
|
||||||
"Enable Prelude additional global keybindings"
|
(global-set-key (kbd "C-M-h") 'backward-kill-word)
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-disable-arrow-navigation t
|
;; Align your code in a pretty way.
|
||||||
"Disable arrow navigation"
|
(global-set-key (kbd "C-x \\") 'align-regexp)
|
||||||
:type 'boolean
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(when prelude-enable-additional-keybindings
|
;; Perform general cleanup.
|
||||||
;; You know, like Readline.
|
(global-set-key (kbd "C-c n") 'prelude-cleanup-buffer)
|
||||||
(global-set-key (kbd "C-M-h") 'backward-kill-word)
|
|
||||||
|
|
||||||
;; Align your code in a pretty way.
|
;; Font size
|
||||||
(global-set-key (kbd "C-x \\") 'align-regexp)
|
(define-key global-map (kbd "C-+") 'text-scale-increase)
|
||||||
|
(define-key global-map (kbd "C--") 'text-scale-decrease)
|
||||||
|
|
||||||
;; Perform general cleanup.
|
;; Jump to a definition in the current file. (This is awesome.)
|
||||||
(global-set-key (kbd "C-c n") 'prelude-cleanup-buffer)
|
(global-set-key (kbd "M-i") 'prelude-ido-goto-symbol)
|
||||||
|
|
||||||
;; Font size
|
;; File finding
|
||||||
(define-key global-map (kbd "C-+") 'text-scale-increase)
|
(global-set-key (kbd "C-x f") 'prelude-recentf-ido-find-file)
|
||||||
(define-key global-map (kbd "C--") 'text-scale-decrease)
|
(global-set-key (kbd "C-c r") 'bury-buffer)
|
||||||
|
(global-set-key (kbd "M-`") 'file-cache-minibuffer-complete)
|
||||||
|
|
||||||
;; Jump to a definition in the current file. (This is awesome.)
|
;; Window switching. (C-x o goes to the next window)
|
||||||
(global-set-key (kbd "M-i") 'prelude-ido-goto-symbol)
|
(global-set-key (kbd "C-x O") (lambda ()
|
||||||
|
(interactive)
|
||||||
|
(other-window -1))) ;; back one
|
||||||
|
|
||||||
;; File finding
|
;; Indentation help
|
||||||
(global-set-key (kbd "C-x f") 'prelude-recentf-ido-find-file)
|
(global-set-key (kbd "C-x ^") 'join-line)
|
||||||
(global-set-key (kbd "C-c r") 'bury-buffer)
|
(global-set-key (kbd "C-M-\\") 'prelude-indent-region-or-buffer)
|
||||||
(global-set-key (kbd "M-`") 'file-cache-minibuffer-complete)
|
|
||||||
|
|
||||||
;; Window switching. (C-x o goes to the next window)
|
;; Start proced in a similar manner to dired
|
||||||
(global-set-key (kbd "C-x O") (lambda ()
|
(global-set-key (kbd "C-x p") 'proced)
|
||||||
(interactive)
|
|
||||||
(other-window -1))) ;; back one
|
|
||||||
|
|
||||||
;; Indentation help
|
;; Start eshell or switch to it if it's active.
|
||||||
(global-set-key (kbd "C-x ^") 'join-line)
|
(global-set-key (kbd "C-x m") 'eshell)
|
||||||
(global-set-key (kbd "C-M-\\") 'prelude-indent-region-or-buffer)
|
|
||||||
|
|
||||||
;; Start proced in a similar manner to dired
|
;; Start a new eshell even if one is active.
|
||||||
(global-set-key (kbd "C-x p") 'proced)
|
(global-set-key (kbd "C-x M") (lambda () (interactive) (eshell t)))
|
||||||
|
|
||||||
;; Start eshell or switch to it if it's active.
|
;; Start a regular shell if you prefer that.
|
||||||
(global-set-key (kbd "C-x m") 'eshell)
|
(global-set-key (kbd "C-x M-m") 'shell)
|
||||||
|
|
||||||
;; Start a new eshell even if one is active.
|
;; If you want to be able to M-x without meta
|
||||||
(global-set-key (kbd "C-x M") (lambda () (interactive) (eshell t)))
|
(global-set-key (kbd "C-x C-m") 'execute-extended-command)
|
||||||
|
|
||||||
;; Start a regular shell if you prefer that.
|
;; Fetch the contents at a URL, display it raw.
|
||||||
(global-set-key (kbd "C-x M-m") 'shell)
|
(global-set-key (kbd "C-x C-h") 'prelude-view-url)
|
||||||
|
|
||||||
;; If you want to be able to M-x without meta
|
;; A complementary binding to the apropos-command(C-h a)
|
||||||
(global-set-key (kbd "C-x C-m") 'execute-extended-command)
|
(global-set-key (kbd "C-h A") 'apropos)
|
||||||
|
|
||||||
;; Fetch the contents at a URL, display it raw.
|
;; Should be able to eval-and-replace anywhere.
|
||||||
(global-set-key (kbd "C-x C-h") 'prelude-view-url)
|
(global-set-key (kbd "C-c e") 'prelude-eval-and-replace)
|
||||||
|
|
||||||
;; A complementary binding to the apropos-command(C-h a)
|
;; Magit rules!
|
||||||
(global-set-key (kbd "C-h A") 'apropos)
|
(global-set-key (kbd "C-x g") 'magit-status)
|
||||||
|
|
||||||
;; Should be able to eval-and-replace anywhere.
|
;; Activate occur easily inside isearch
|
||||||
(global-set-key (kbd "C-c e") 'prelude-eval-and-replace)
|
(define-key isearch-mode-map (kbd "C-o")
|
||||||
|
(lambda () (interactive)
|
||||||
|
(let ((case-fold-search isearch-case-fold-search))
|
||||||
|
(occur (if isearch-regexp
|
||||||
|
isearch-string
|
||||||
|
(regexp-quote isearch-string))))))
|
||||||
|
|
||||||
;; Magit rules!
|
;; cycle through buffers
|
||||||
(global-set-key (kbd "C-x g") 'magit-status)
|
(global-set-key (kbd "<C-tab>") 'bury-buffer)
|
||||||
|
|
||||||
;; Activate occur easily inside isearch
|
;; use hippie-expand instead of dabbrev
|
||||||
(define-key isearch-mode-map (kbd "C-o")
|
(global-set-key (kbd "M-/") 'hippie-expand)
|
||||||
(lambda () (interactive)
|
|
||||||
(let ((case-fold-search isearch-case-fold-search))
|
|
||||||
(occur (if isearch-regexp
|
|
||||||
isearch-string
|
|
||||||
(regexp-quote isearch-string))))))
|
|
||||||
|
|
||||||
;; cycle through buffers
|
;; spell check Bulgarian text
|
||||||
(global-set-key (kbd "<C-tab>") 'bury-buffer)
|
(global-set-key (kbd "C-c B")
|
||||||
|
(lambda()(interactive)
|
||||||
|
(ispell-change-dictionary "bulgarian")
|
||||||
|
(flyspell-buffer)))
|
||||||
|
|
||||||
;; use hippie-expand instead of dabbrev
|
;; replace buffer-menu with ibuffer
|
||||||
(global-set-key (kbd "M-/") 'hippie-expand)
|
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
||||||
|
|
||||||
;; spell check Bulgarian text
|
;; swap windows
|
||||||
(global-set-key (kbd "C-c B")
|
(global-set-key (kbd "C-c s") 'prelude-swap-windows)
|
||||||
(lambda()(interactive)
|
|
||||||
(ispell-change-dictionary "bulgarian")
|
|
||||||
(flyspell-buffer)))
|
|
||||||
|
|
||||||
;; replace buffer-menu with ibuffer
|
;; duplicate the current line or region
|
||||||
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
(global-set-key (kbd "C-c d") 'prelude-duplicate-current-line-or-region)
|
||||||
|
|
||||||
;; swap windows
|
;; rename buffer & visited file
|
||||||
(global-set-key (kbd "C-c s") 'prelude-swap-windows)
|
(global-set-key (kbd "C-c r") 'prelude-rename-file-and-buffer)
|
||||||
|
|
||||||
;; duplicate the current line or region
|
;; open an ansi-term buffer
|
||||||
(global-set-key (kbd "C-c d") 'prelude-duplicate-current-line-or-region)
|
(global-set-key (kbd "C-x t") 'prelude-visit-term-buffer)
|
||||||
|
|
||||||
;; rename buffer & visited file
|
;; toggle input method
|
||||||
(global-set-key (kbd "C-c r") 'prelude-rename-file-and-buffer)
|
(global-set-key (kbd "C-\\") 'prelude-toggle-bulgarian-input-method)
|
||||||
|
|
||||||
;; open an ansi-term buffer
|
;; search with google
|
||||||
(global-set-key (kbd "C-x t") 'prelude-visit-term-buffer)
|
(global-set-key (kbd "C-c g") 'prelude-google)
|
||||||
|
|
||||||
;; toggle input method
|
;; open in external application
|
||||||
(global-set-key (kbd "C-\\") 'prelude-toggle-bulgarian-input-method)
|
(global-set-key (kbd "C-c o") 'prelude-open-with)
|
||||||
|
|
||||||
;; search with google
|
;; toggle menu-bar visibility
|
||||||
(global-set-key (kbd "C-c g") 'prelude-google)
|
(global-set-key (kbd "<f12>") 'menu-bar-mode)
|
||||||
|
|
||||||
;; open in external application
|
;; real Emacs hackers don't use the arrow keys
|
||||||
(global-set-key (kbd "C-c o") 'prelude-open-with)
|
(global-set-key (kbd "<up>") (lambda ()
|
||||||
|
(interactive)
|
||||||
;; toggle menu-bar visibility
|
(message "Arrow key navigation is disabled. Use C-p instead.")))
|
||||||
(global-set-key (kbd "<f12>") 'menu-bar-mode))
|
(global-set-key (kbd "<down>") (lambda ()
|
||||||
|
|
||||||
(when prelude-disable-arrow-navigation
|
|
||||||
;; real Emacs hackers don't use the arrow keys
|
|
||||||
(global-set-key (kbd "<up>") (lambda ()
|
|
||||||
(interactive)
|
(interactive)
|
||||||
(message "Arrow key navigation is disabled. Use C-p instead.")))
|
(message "Arrow key navigation is disabled. Use C-n instead.")))
|
||||||
(global-set-key (kbd "<down>") (lambda ()
|
(global-set-key (kbd "<left>") (lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(message "Arrow key navigation is disabled. Use C-n instead.")))
|
(message "Arrow key navigation is disabled. Use C-b instead.")))
|
||||||
(global-set-key (kbd "<left>") (lambda ()
|
(global-set-key (kbd "<right>") (lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(message "Arrow key navigation is disabled. Use C-b instead.")))
|
(message "Arrow key navigation is disabled. Use C-f instead.")))
|
||||||
(global-set-key (kbd "<right>") (lambda ()
|
|
||||||
(interactive)
|
|
||||||
(message "Arrow key navigation is disabled. Use C-f instead."))))
|
|
||||||
|
|
||||||
(provide 'prelude-global-keybindings)
|
(provide 'prelude-global-keybindings)
|
||||||
|
|
||||||
|
|
|
@ -32,23 +32,12 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; customize
|
|
||||||
(defgroup javascript nil
|
|
||||||
"Emacs Prelude JavaScript programming support"
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-enable-js-hook t
|
|
||||||
"Enable Prelude's default JavaScript hook."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'javascript)
|
|
||||||
|
|
||||||
(defun prelude-js-coding-hook ()
|
(defun prelude-js-coding-hook ()
|
||||||
(prelude-coding-hook)
|
(prelude-coding-hook)
|
||||||
;; electric-layout-mode doesn't play nice with js-mode
|
;; electric-layout-mode doesn't play nice with js-mode
|
||||||
(electric-layout-mode -1))
|
(electric-layout-mode -1))
|
||||||
|
|
||||||
(when prelude-enable-js-hook
|
(add-hook 'js-mode-hook 'prelude-js-coding-hook)
|
||||||
(add-hook 'js-mode-hook 'prelude-js-coding-hook))
|
|
||||||
|
|
||||||
(provide 'prelude-js)
|
(provide 'prelude-js)
|
||||||
|
|
||||||
|
|
|
@ -32,15 +32,6 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defgroup perl nil
|
|
||||||
"Emacs Prelude Perl support."
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-enable-perl-hook t
|
|
||||||
"Enable Prelude's Perl hook"
|
|
||||||
:type 'boolean
|
|
||||||
:group 'perl)
|
|
||||||
|
|
||||||
;; use cperl-mode instead of perl-mode
|
;; use cperl-mode instead of perl-mode
|
||||||
(defalias 'perl-mode 'cperl-mode)
|
(defalias 'perl-mode 'cperl-mode)
|
||||||
|
|
||||||
|
@ -65,8 +56,7 @@
|
||||||
(set-face-background 'cperl-hash-face nil)
|
(set-face-background 'cperl-hash-face nil)
|
||||||
(setq cperl-invalid-face nil))
|
(setq cperl-invalid-face nil))
|
||||||
|
|
||||||
(when prelude-enable-perl-hook
|
(add-hook 'cperl-mode-hook 'prelude-cperl-mode-hook t)
|
||||||
(add-hook 'cperl-mode-hook 'prelude-cperl-mode-hook t))
|
|
||||||
|
|
||||||
(provide 'prelude-perl)
|
(provide 'prelude-perl)
|
||||||
|
|
||||||
|
|
|
@ -33,23 +33,12 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; customize
|
|
||||||
(defgroup python nil
|
|
||||||
"Emacs Prelude C programming support"
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-enable-python-hook t
|
|
||||||
"Enable Prelude's default Python hook."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'python)
|
|
||||||
|
|
||||||
(require 'python)
|
(require 'python)
|
||||||
|
|
||||||
(defun prelude-python-coding-hook ()
|
(defun prelude-python-coding-hook ()
|
||||||
(electric-indent-mode -1))
|
(electric-indent-mode -1))
|
||||||
|
|
||||||
(when prelude-enable-python-hook
|
(add-hook 'python-mode-hook 'prelude-python-coding-hook)
|
||||||
(add-hook 'python-mode-hook 'prelude-python-coding-hook))
|
|
||||||
|
|
||||||
(provide 'prelude-python)
|
(provide 'prelude-python)
|
||||||
|
|
||||||
|
|
|
@ -32,15 +32,6 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defgroup ruby nil
|
|
||||||
"Emacs Prelude Ruby support"
|
|
||||||
:group 'prelude)
|
|
||||||
|
|
||||||
(defcustom prelude-enable-ruby-hook t
|
|
||||||
"Enable Prelude's Ruby hook"
|
|
||||||
:type 'boolean
|
|
||||||
:group 'ruby)
|
|
||||||
|
|
||||||
;; Rake files are ruby, too, as are gemspecs, rackup files, and gemfiles.
|
;; Rake files are ruby, too, as are gemspecs, rackup files, and gemfiles.
|
||||||
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
|
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
|
||||||
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
|
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
|
||||||
|
@ -76,8 +67,7 @@
|
||||||
(ruby-block-mode t)
|
(ruby-block-mode t)
|
||||||
(local-set-key (kbd "C-h r") 'yari))
|
(local-set-key (kbd "C-h r") 'yari))
|
||||||
|
|
||||||
(when prelude-enable-ruby-hook
|
(add-hook 'ruby-mode-hook 'prelude-ruby-mode-hook)
|
||||||
(add-hook 'ruby-mode-hook 'prelude-ruby-mode-hook))
|
|
||||||
|
|
||||||
(require 'haml-mode)
|
(require 'haml-mode)
|
||||||
(require 'scss-mode)
|
(require 'scss-mode)
|
||||||
|
|
|
@ -33,62 +33,30 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; customization
|
;; the toolbar is just a waste of valuable screen estate
|
||||||
(defgroup ui nil
|
;; in a tty tool-bar-mode does not properly auto-load, and is
|
||||||
"Emacs Prelude UI"
|
;; already disabled anyway
|
||||||
:group 'prelude)
|
(when (fboundp 'tool-bar-mode)
|
||||||
|
|
||||||
(defcustom prelude-use-minimalistic-ui t
|
|
||||||
"If set to true Prelude will dispense of most the UI that's mouse related -
|
|
||||||
menu bar, tool bar, etc"
|
|
||||||
:type 'boolean
|
|
||||||
:group 'ui)
|
|
||||||
|
|
||||||
(defcustom prelude-use-smooth-scrolling t
|
|
||||||
"Overrides the default scrolling behavior with a much more common one."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'ui)
|
|
||||||
|
|
||||||
(defcustom prelude-use-default-prelude-theme t
|
|
||||||
"If set to true Prelude will load up its default theme (Zenburn),
|
|
||||||
instead of Emacs's default theme."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'ui)
|
|
||||||
|
|
||||||
(defcustom prelude-enhance-modeline t
|
|
||||||
"If set to true Prelude will augment the default modeline settings."
|
|
||||||
:type 'boolean
|
|
||||||
:group 'ui)
|
|
||||||
|
|
||||||
|
|
||||||
(when prelude-use-minimalistic-ui
|
|
||||||
;; the toolbar is just a waste of valuable screen estate
|
|
||||||
;; in a tty tool-bar-mode does not properly auto-load, and is
|
|
||||||
;; already disabled anyway
|
|
||||||
(when (fboundp 'tool-bar-mode)
|
|
||||||
(tool-bar-mode -1))
|
(tool-bar-mode -1))
|
||||||
;; the menu bar is mostly useless as well
|
;; the menu bar is mostly useless as well
|
||||||
;; but removing it under OS X doesn't make much sense
|
;; but removing it under OS X doesn't make much sense
|
||||||
(unless (eq system-type 'darwin)
|
(unless (eq system-type 'darwin)
|
||||||
(menu-bar-mode -1))
|
(menu-bar-mode -1))
|
||||||
;; the blinking cursor is nothing, but an annoyance
|
;; the blinking cursor is nothing, but an annoyance
|
||||||
(blink-cursor-mode -1)
|
(blink-cursor-mode -1)
|
||||||
|
|
||||||
;; disable startup screen
|
;; disable startup screen
|
||||||
(setq inhibit-startup-screen t))
|
(setq inhibit-startup-screen t)
|
||||||
|
|
||||||
|
;; nice scrolling
|
||||||
|
(setq scroll-margin 0
|
||||||
|
scroll-conservatively 100000
|
||||||
|
scroll-preserve-screen-position 1)
|
||||||
|
|
||||||
(when prelude-use-smooth-scrolling
|
;; mode line settings
|
||||||
;; nice scrolling
|
(line-number-mode t)
|
||||||
(setq scroll-margin 0
|
(column-number-mode t)
|
||||||
scroll-conservatively 100000
|
(size-indication-mode t)
|
||||||
scroll-preserve-screen-position 1))
|
|
||||||
|
|
||||||
(when prelude-enhance-modeline
|
|
||||||
;; mode line settings
|
|
||||||
(line-number-mode t)
|
|
||||||
(column-number-mode t)
|
|
||||||
(size-indication-mode t))
|
|
||||||
|
|
||||||
;; enable y/n answers
|
;; enable y/n answers
|
||||||
(fset 'yes-or-no-p 'y-or-n-p)
|
(fset 'yes-or-no-p 'y-or-n-p)
|
||||||
|
@ -96,8 +64,8 @@ instead of Emacs's default theme."
|
||||||
;; custom Emacs 24 color themes support
|
;; custom Emacs 24 color themes support
|
||||||
(add-to-list 'custom-theme-load-path (concat prelude-dir "themes/"))
|
(add-to-list 'custom-theme-load-path (concat prelude-dir "themes/"))
|
||||||
|
|
||||||
(when prelude-use-default-prelude-theme
|
;; use zenburn as the default theme
|
||||||
(load-theme 'zenburn t))
|
(load-theme 'zenburn t)
|
||||||
|
|
||||||
(provide 'prelude-ui)
|
(provide 'prelude-ui)
|
||||||
;;; prelude-ui.el ends here
|
;;; prelude-ui.el ends here
|
||||||
|
|
Loading…
Reference in a new issue