.emacs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. (custom-set-variables
  2. ;; custom-set-variables was added by Custom.
  3. ;; If you edit it by hand, you could mess it up, so be careful.
  4. ;; Your init file should contain only one such instance.
  5. ;; If there is more than one, they won't work right.
  6. '(before-save-hook (quote (whitespace-cleanup)))
  7. '(column-number-mode t)
  8. '(default-justification (quote full))
  9. '(electric-layout-mode t)
  10. '(fill-column 95)
  11. '(global-whitespace-mode t)
  12. '(global-whitespace-newline-mode t)
  13. '(indent-tabs-mode nil)
  14. '(indicate-empty-lines t)
  15. '(org-babel-load-languages
  16. (quote
  17. ((emacs-lisp . t)
  18. (sh . t)
  19. (css . t)
  20. (C . t)
  21. (perl . t)
  22. (lisp . t)
  23. (java . t)
  24. (haskell . t)
  25. (js . t)
  26. (ocaml . t)
  27. (makefile . t)
  28. (clojure . t)
  29. (latex . t))))
  30. '(org-confirm-babel-evaluate nil)
  31. '(org-todo-keywords (quote ((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE"))))
  32. '(save-place t nil (saveplace))
  33. '(show-paren-mode t)
  34. '(size-indication-mode t)
  35. '(standard-indent 2)
  36. '(tab-always-indent t)
  37. '(tab-width 2)
  38. '(whitespace-line-column 100))
  39. (custom-set-faces
  40. ;; custom-set-faces was added by Custom.
  41. ;; If you edit it by hand, you could mess it up, so be careful.
  42. ;; Your init file should contain only one such instance.
  43. ;; If there is more than one, they won't work right.
  44. '(default ((t (:family "Noto Mono" :foundry "monotype" :slant normal :weight normal :height 83 :width normal))))
  45. '(whitespace-empty ((t (:background "white" :foreground "firebrick"))))
  46. '(whitespace-indentation ((t (:background "white" :foreground "firebrick"))))
  47. '(whitespace-space-after-tab ((t (:background "gainsboro" :foreground "firebrick"))))
  48. '(whitespace-space-before-tab ((t (:background "gainsboro" :foreground "firebrick")))))
  49. (defvar current-date-time-format "<%F %T>: ")
  50. (defun insert-date-time ()
  51. (interactive)
  52. (insert (format-time-string current-date-time-format (current-time))) )
  53. (defun comment-eclipse ()
  54. (interactive)
  55. (let ((start (line-beginning-position))
  56. (end (line-end-position)))
  57. (when (or (not transient-mark-mode) (region-active-p))
  58. (setq start (save-excursion
  59. (goto-char (region-beginning))
  60. (beginning-of-line)
  61. (point))
  62. end (save-excursion
  63. (goto-char (region-end))
  64. (end-of-line)
  65. (point))))
  66. (comment-or-uncomment-region start end)))
  67. (global-set-key [(control x)(t)] 'insert-date-time)
  68. (global-set-key [(control x)(u)] 'comment-eclipse)
  69. (add-to-list 'load-path "~/.emacs.d/lisp/")
  70. (require 'buffer-move)
  71. (require 'window-numbering)
  72. (global-set-key [(control c)(up)] 'buf-move-up)
  73. (global-set-key [(control c)(down)] 'buf-move-down)
  74. (global-set-key [(control c)(left)] 'buf-move-left)
  75. (global-set-key [(control c)(right)] 'buf-move-right)
  76. (require 'move-lines)
  77. (move-lines-binding)
  78. (global-set-key [(control x)(left)] 'shrink-window-horizontally)
  79. (global-set-key [(control x)(right)] 'enlarge-window-horizontally)
  80. (global-set-key [(control x)(down)] 'shrink-window)
  81. (global-set-key [(control x)(up)] 'enlarge-window)
  82. (global-set-key [(f5)] 'multishell-pop-to-shell)
  83. (window-numbering-mode)