Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;; Global config
- (global-set-key "\r" 'newline-and-indent)
- ;; (setq scroll-step 1)
- (setq-default tab-width 4)
- (setq c-default-style "linux"
- c-basic-offset 2)
- ;;(setq-default c-basic-offset 2)
- ;; Disallow tabs
- (setq-default indent-tabs-mode nil)
- ;; Cut-paste uses clipboard
- (setq x-select-enable-clipboard t)
- ;; Add hooks to load 80+ column highlighting in the following modes
- (add-hook 'c-mode-common-hook (lambda () (highlight-80+-mode t) ) )
- (add-hook 'text-mode-hook (lambda () (highlight-80+-mode t) ) )
- (add-hook 'emacs-lisp-mode-hook (lambda () (highlight-80+-mode t) ) )
- (add-hook 'python-mode-hook (lambda () (highlight-80+-mode t) ) )
- (add-hook 'javascript-mode-hook (lambda () (highlight-80+-mode t) ) )
- (add-hook 'html-mode-hook (lambda () (highlight-80+-mode t) ) )
- ;;Disable startup message
- ;; (setq inhibit-startup-message t)
- ;; Add the color-theme package to the load path (required for zenburn)
- (add-to-list 'load-path "~/.emacs.d/color-theme/")
- ;;Load in special php-optimized library
- (load-library "~/.emacs.d/python-mode.el")
- (load-library "~/.emacs.d/php-mode.el")
- (load-library "~/.emacs.d/javascript.el")
- (load-library "~/.emacs.d/highlight-80+.el")
- (load-library "~/.emacs.d/zenburn.el")
- ;; Set the 'zenburn' color-theme
- (color-theme-zenburn)
- ;;Create a backup file directory
- ;;(defun make-backup-file-name (file)
- ;; (concat "~/.emacs_backups/" (file-name-nondirectory file) "~"))
- ;;; Org Mode config
- (defun org-summary-todo (n-done n-not-done)
- "Switch entry to DONE when all subentries are done, to TODO otherwise."
- (let (org-log-done org-log-states) ; turn off logging
- (org-todo (if (= n-not-done 0) "DONE" "TODO"))))
- (add-hook 'org-after-todo-statistics-hook 'org-summary-todo)
- (custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(column-number-mode t)
- '(show-paren-mode t))
- (custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- )
- ;;; GNU Global config
- (setq load-path (cons "/home/owner/global" load-path))
- (autoload 'gtags-mode "gtags" "" t)
- (setq c-mode-hook '(lambda () (gtags-mode 1) ) )
- ;;; Python config
- (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
- (setq interpreter-mode-alist (cons '("python" . python-mode)
- interpreter-mode-alist))
- (autoload 'python-mode "python-mode" "Python editing mode." t)
- ;; ElDoc mode
- (add-hook 'python-mode-hook '(lambda () (eldoc-mode 1)) t)
- ;; Electric Pairs
- (add-hook 'python-mode-hook
- (lambda ()
- (define-key python-mode-map "\"" 'electric-pair)
- (define-key python-mode-map "\'" 'electric-pair)
- (define-key python-mode-map "(" 'electric-pair)
- (define-key python-mode-map "[" 'electric-pair)
- (define-key python-mode-map "{" 'electric-pair)))
- (defun electric-pair ()
- "Insert character pair without sournding spaces"
- (interactive)
- (let (parens-require-spaces)
- (insert-pair)))
- ;; bind RET to py-newline-and-indent
- (add-hook 'python-mode-hook '(lambda ()
- (define-key python-mode-map "\C-m" 'newline-and-indent)))
Add Comment
Please, Sign In to add comment