Personal emacs config
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.1 KiB

  1. ;;; better-defaults.el --- Fixing weird quirks and poor defaults
  2. ;; Copyright © 2013-2016 Phil Hagelberg and contributors
  3. ;; Author: Phil Hagelberg
  4. ;; URL: https://github.com/technomancy/better-defaults
  5. ;; Package-Version: 0.1.3
  6. ;; Package-Commit: 90df5752a0a0602feb47aadfd3542aa7fc841bd8
  7. ;; Version: 0.1.3
  8. ;; Created: 2013-04-16
  9. ;; Keywords: convenience
  10. ;; This file is NOT part of GNU Emacs.
  11. ;;; Commentary:
  12. ;; There are a number of unfortunate facts about the way Emacs works
  13. ;; out of the box. While all users will eventually need to learn their
  14. ;; way around in order to customize it to their particular tastes,
  15. ;; this package attempts to address the most obvious of deficiencies
  16. ;; in uncontroversial ways that nearly everyone can agree upon.
  17. ;; Obviously there are many further tweaks you could do to improve
  18. ;; Emacs, (like those the Starter Kit and similar packages) but this
  19. ;; package focuses only on those that have near-universal appeal.
  20. ;;; License:
  21. ;; This program is free software; you can redistribute it and/or modify
  22. ;; it under the terms of the GNU General Public License as published by
  23. ;; the Free Software Foundation; either version 3, or (at your option)
  24. ;; any later version.
  25. ;;
  26. ;; This program is distributed in the hope that it will be useful,
  27. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  28. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  29. ;; GNU General Public License for more details.
  30. ;;
  31. ;; You should have received a copy of the GNU General Public License
  32. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  33. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  34. ;; Boston, MA 02110-1301, USA.
  35. ;;; Code:
  36. ;;;###autoload
  37. (progn
  38. (ido-mode t)
  39. (setq ido-enable-flex-matching t)
  40. (menu-bar-mode -1)
  41. (when (fboundp 'tool-bar-mode)
  42. (tool-bar-mode -1))
  43. (when (fboundp 'scroll-bar-mode)
  44. (scroll-bar-mode -1))
  45. (autoload 'zap-up-to-char "misc"
  46. "Kill up to, but not including ARGth occurrence of CHAR." t)
  47. (require 'uniquify)
  48. (setq uniquify-buffer-name-style 'forward)
  49. (require 'saveplace)
  50. (setq-default save-place t)
  51. (global-set-key (kbd "M-/") 'hippie-expand)
  52. (global-set-key (kbd "C-x C-b") 'ibuffer)
  53. (global-set-key (kbd "M-z") 'zap-up-to-char)
  54. (global-set-key (kbd "C-s") 'isearch-forward-regexp)
  55. (global-set-key (kbd "C-r") 'isearch-backward-regexp)
  56. (global-set-key (kbd "C-M-s") 'isearch-forward)
  57. (global-set-key (kbd "C-M-r") 'isearch-backward)
  58. (show-paren-mode 1)
  59. (setq-default indent-tabs-mode nil)
  60. (setq x-select-enable-clipboard t
  61. x-select-enable-primary t
  62. save-interprogram-paste-before-kill t
  63. apropos-do-all t
  64. mouse-yank-at-point t
  65. require-final-newline t
  66. visible-bell t
  67. load-prefer-newer t
  68. ediff-window-setup-function 'ediff-setup-windows-plain
  69. save-place-file (concat user-emacs-directory "places")
  70. backup-directory-alist `(("." . ,(concat user-emacs-directory
  71. "backups")))))
  72. (provide 'better-defaults)
  73. ;;; better-defaults.el ends here