Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Load path
- (add-to-list 'load-path "~/.emacs.d")
- ;; Scroll one line
- (setq scroll-step 1)
- ;; C
- (setq c-default-style "linux")
- (setq-default indent-tabs-mode nil)
- (show-paren-mode t)
- (setq linum-format "%d ")
- ;; Colors
- (global-font-lock-mode t)
- ;; Colors
- (if (display-graphic-p)
- (progn
- (set-background-color "black")
- (set-foreground-color "white")
- (set-cursor-color "green"))
- (set-face-foreground 'minibuffer-prompt "white"))
- ;; EShell
- (add-hook 'eshell-mode-hook (lambda ()
- (define-key eshell-mode-map "\C-a" 'eshell-bol)))
- (defun require-or-get-and-require (feature url full-filename)
- "Download feature from url is not already there, then require feature
- The full-filename must be on path"
- (unless (require feature nil t)
- (condition-case err
- (with-current-buffer (url-retrieve-synchronously url)
- (goto-char (point-min))
- (write-region (1+ (re-search-forward "^$")) ;; Skip HTTP header
- (point-max)
- full-filename)
- (require feature))
- (error
- (message (format "Error: %s while downloading file %s" (nth 1 err) full-filename))))))
- (byte-compile 'require-or-get-and-require)
- (require-or-get-and-require
- 'xcscope
- "http://inst.eecs.berkeley.edu/~cs186/fa05/debugging/xcscope.el"
- "~/.emacs.d/xcscope.el")
- ;; Neopastebin
- (add-to-list 'load-path "~/programming/emacs-pastebin/")
- (require 'neopastebin)
- (pastebin-create-login :dev-key "86d04e1d25921b3373b20793d5ce064f"
- :username "danielhilst")
- (defun jffs2size (size)
- "Calculate de size of a jffs2 filesystem, given its real size in bytes"
- (interactive "nSize: ")
- (let* ((lexical-binding t)
- (pg-size 2048)
- (size (format "%X" (+ size (- pg-size (% size pg-size))))))
- (kill-new size)
- (message (format "Size send to clipboard, %s" size))))
- (require-or-get-and-require
- 'bb-mode
- "https://raw.githubusercontent.com/mferland/bb-mode/master/bb-mode.el"
- "~/.emacs.d/bb-mode.el")
- (setq auto-mode-alist (cons '("\\.bb$" . bb-mode) auto-mode-alist))
- (setq auto-mode-alist (cons '("\\.inc$" . bb-mode) auto-mode-alist))
- (setq auto-mode-alist (cons '("\\.bbappend$" . bb-mode) auto-mode-alist))
- (setq auto-mode-alist (cons '("\\.bbclass$" . bb-mode) auto-mode-alist))
- (setq auto-mode-alist (cons '("\\.conf$" . bb-mode) auto-mode-alist))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement