emacs.el
changeset 9 c72d0d9f61cb
parent 8 f16b95667aa6
child 10 eb4d42b61a62
equal deleted inserted replaced
8:f16b95667aa6 9:c72d0d9f61cb
     5 (setq-default load-path (cons "~/.emacs.d/" load-path))               ; set default emacs load path
     5 (setq-default load-path (cons "~/.emacs.d/" load-path))               ; set default emacs load path
     6 
     6 
     7 (setq-default ediff-split-window-function 'split-window-horizontally) ; diff horizontally
     7 (setq-default ediff-split-window-function 'split-window-horizontally) ; diff horizontally
     8 (setq-default x-select-enable-clipboard t)                            ; paste from X buffer
     8 (setq-default x-select-enable-clipboard t)                            ; paste from X buffer
     9 (setq-default inhibit-splash-screen t)                                ; disable splash screen
     9 (setq-default inhibit-splash-screen t)                                ; disable splash screen
       
    10 (setq-default truncate-lines t)
    10 (put 'set-goal-column 'disabled nil)                                  ; enable goal column setting
    11 (put 'set-goal-column 'disabled nil)                                  ; enable goal column setting
    11 (put 'narrow-to-region 'disabled nil)                                 ; enable hiding
    12 (put 'narrow-to-region 'disabled nil)                                 ; enable hiding
    12 
    13 
    13 (display-time-mode t)                                                 ; show clock
    14 (display-time-mode t)                                                 ; show clock
    14 (column-number-mode t)                                                ; show column numbers
    15 (column-number-mode t)                                                ; show column numbers
    24 (which-func-mode t)                                                   ; show current function
    25 (which-func-mode t)                                                   ; show current function
    25 (show-paren-mode t)                                                   ; show matching paren
    26 (show-paren-mode t)                                                   ; show matching paren
    26 (transient-mark-mode t)                                               ; show highlighting
    27 (transient-mark-mode t)                                               ; show highlighting
    27 (global-font-lock-mode t)                                             ; syntax highlighting
    28 (global-font-lock-mode t)                                             ; syntax highlighting
    28 (global-whitespace-mode t)                                            ; show whitespace
    29 (global-whitespace-mode t)                                            ; show whitespace
       
    30 (global-linum-mode t)
    29 (setq-default whitespace-style '(tab-mark trailing tabs empty))       ; what whitespace elements to show
    31 (setq-default whitespace-style '(tab-mark trailing tabs empty))       ; what whitespace elements to show
    30 (add-hook 'before-save-hook 'whitespace-cleanup)                      ; cleanup whitespace on exit
    32 (add-hook 'before-save-hook 'whitespace-cleanup)                      ; cleanup whitespace on exit
    31 (global-set-key (kbd "C-c c") 'compile)                               ; compile
    33 (global-set-key (kbd "C-c c") 'compile)                               ; compile
    32 (global-set-key (kbd "C-c r") 'recompile)                             ; recompile
    34 (global-set-key (kbd "C-c r") 'recompile)                             ; recompile
    33 
    35 
    80 ;; x stuff
    82 ;; x stuff
    81 (if (not window-system)
    83 (if (not window-system)
    82     (menu-bar-mode nil) ; remove menu bar in no-x mode
    84     (menu-bar-mode nil) ; remove menu bar in no-x mode
    83   (tool-bar-mode nil)   ; remove tool bar
    85   (tool-bar-mode nil)   ; remove tool bar
    84   (scroll-bar-mode nil) ; remove scroll bar
    86   (scroll-bar-mode nil) ; remove scroll bar
    85   (custom-set-faces '(default ((t (:background "#000000" :foreground "#ffffff" :height 101 :family "DejaVu Sans Mono")))))
       
    86   (setq default-frame-alist '((width . 100) (height . 50) (menu-bar-lines . 1)))
       
    87   (visual-line-mode t)  ; word wrap break on whitespace
    87   (visual-line-mode t)  ; word wrap break on whitespace
       
    88   (set-default-font "Monospace-10")
    88 
    89 
    89   ;; twilight theme
    90   ;; twilight theme
    90   (require 'color-theme)
    91   (require 'color-theme)
    91   (load "color-theme-twilight")
    92   (load "color-theme-twilight")
    92   (color-theme-twilight)
    93   (color-theme-twilight)