Skip to content

Instantly share code, notes, and snippets.

@gennad
Created April 3, 2012 09:00
Show Gist options
  • Select an option

  • Save gennad/2290559 to your computer and use it in GitHub Desktop.

Select an option

Save gennad/2290559 to your computer and use it in GitHub Desktop.
My .emacs
(setq org-directory "~/org/")
(load-file "/home/gennad/.emacs.d/emacs-for-python/epy-init.el")
;; To require
;;(add-to-list 'load-path "~/.emacs.d/http")
;;(require 'http-post-curl)
;;(require 'http-twiddle)
;;(load-file "/home/gennad/.emacs.d/http-post-curl.el")
;;(load-file "/home/gennad/.emacs.d/http-post-curl.el")
;;(load-file "/home/gennad/.emacs.d/http-get.el")
;;(require 'http-post-curl)
(blink-cursor-mode (- (*) (*) (*)))
(add-to-list 'load-path "/home/gennad/.emacs.d/nav/")
(require 'nav)
;;(require 'git-emacs)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(defun my-other-delete-trailing-blank-lines ()
"Deletes all blank lines at the end of the file, even the last one"
(interactive)
(save-excursion
(save-restriction
(widen)
(goto-char (point-max))
(delete-blank-lines)
(let ((trailnewlines (abs (skip-chars-backward "\n\t"))))
(if (> trailnewlines 0)
(progn
(delete-char trailnewlines)))))))
;; Add git.el
(add-to-list 'load-path "/home/gennad/.emacs.d/git-el")
(require 'git)
(require 'git-blame)
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
;; ctags
(setq path-to-ctags "/usr/bin/ctags") ;; <- your ctags path here
(defun create-tags (dir-name)
"Create tags file."
(interactive "DDirectory: ")
(shell-command
(format "%s -f %s/TAGS -e -R %s" path-to-ctags dir-name (directory-file-name dir-name)))
)
;;(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/emacs-color-theme-solarized")
;;(load-theme 'solarized-light t)
(require 'color-theme)
(color-theme-initialize)
;;(color-theme-snowish)
(color-theme-scintilla)
(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.
'(desktop-enable t nil (desktop))
'(desktop-save-mode t nil (desktop))
'(org-agenda-files (quote ("~/org/1.org")))
'(save-place t nil (saveplace)))
(desktop-save-mode 1)
(add-to-list 'load-path "/home/gennad/.emacs.d/")
(require 'iy-go-to-char)
(global-set-key (kbd "C-c f") 'iy-go-to-char)
(global-set-key (kbd "C-c F") 'iy-go-to-char-backward)
(global-set-key (kbd "C-c ;") 'iy-go-to-char-continue)
;;(global-set-key (kbd "C-c ,") 'iy-go-to-char-continue-backward)
(epy-setup-checker "pyflakes %f")
(tool-bar-mode -1)
;; Set to the location of your Org files on your local system
;(setq org-directory "~/org")
;; Set to the name of the file where new notes will be stored
(require 'org)
(setq org-mobile-inbox-for-pull "~/org/flagged.org")
;; Set to <your Dropbox root directory>/MobileOrg.
(setq org-mobile-directory "~/Dropbox/MobileOrg")
(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.
)
(setq rsense-home "/home/gennad/.emacs.d/rsense")
(add-to-list 'load-path (concat rsense-home "/etc"))
(require 'rsense)
(require 'tramp)
(setq tramp-default-method "scp")
;; adjust this path:
;;(add-to-list 'load-path "~/.emacs.d/emacs-jabber")
;; For 0.7.90 and above:
(require 'jabber-autoloads)
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
(column-number-mode 1)
(eval-after-load "vc-hooks"
'(define-key vc-prefix-map "=" 'ediff-revision))
(defun ediff-current-buffer-revision ()
"Run Ediff to diff current buffer's file against VC depot.
Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'."
(interactive)
(let ((file (or (buffer-file-name)
(error "Current buffer is not visiting a file"))))
(if (and (buffer-modified-p)
(y-or-n-p (message "Buffer %s is modified. Save buffer? "
(buffer-name))))
(save-buffer (current-buffer)))
(ediff-load-version-control)
(funcall
(intern (format "ediff-%S-internal" ediff-version-control-package))
"" "" nil)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment