(defalias 'gds 'magit-diff-staged)
#+END_SRC
+A little bit of code from https://github.com/bodil/emacs.d/blob/master/bodil/bodil-eshell.el
+
+#+BEGIN_SRC elisp
+ (require 'f)
+
+ ;; Prompt with a bit of help from http://www.emacswiki.org/emacs/EshellPrompt
+ (defmacro with-face (str &rest properties)
+ `(propertize ,str 'face (list ,@properties)))
+
+ (setq hostname (replace-regexp-in-string "\\(^[[:space:]\n]*\\|[[:space:]\n]*$\\)" "" (with-output-to-string (call-process "hostname" nil standard-output))))
+
+ (defun eshell/abbr-pwd ()
+ (let ((home (getenv "HOME"))
+ (path (eshell/pwd)))
+ (cond
+ ((string-equal home path) "~")
+ ((f-ancestor-of? home path) (concat "~/" (f-relative path home)))
+ (path))))
+
+ (defun eshell/my-prompt ()
+ (let ((header-bg "#161616"))
+ (concat
+ (with-face user-login-name :foreground "#d75faf")
+ (with-face (concat "@" hostname) :foreground "#8700af")
+ " "
+ (with-face (eshell/abbr-pwd) :foreground "#008700")
+ (if (= (user-uid) 0)
+ (with-face "#" :foreground "red")
+ (with-face "$" :foreground "#2345ba"))
+ " ")))
+
+ (setq eshell-prompt-function 'eshell/my-prompt)
+ (setq eshell-highlight-prompt nil)
+ (setq eshell-prompt-regexp "^[^#$\n]+[#$] ")
+#+END_SRC
+
* define emacs shutdown function
I like to commit my notes in my org and workorg folders after a days work.
(perl . t)
(sql . t)
(tmux . sh)
+ (R . t)
))
;;(setq org-html-preamble nil
#+BEGIN_SRC emacs-lisp :tangle yes
(if (file-accessible-directory-p "~/.ssh/sockets")
- (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto -o ControlPath=~/.ssh/sockets/ssh.%%C -o ControlPersist=600"))
+ (setq tramp-ssh-controlmaster-options "-o ControlMaster=auto -o ControlPath='~/.ssh/sockets/ssh.%%C' -o ControlPersist=600"))
#+END_SRC
* [[http://www.twmode.sourceforge.net/][twitter]]
(setq ps-paper-type 'a4)
#+END_SRC
+#+BEGIN_SRC emacs-lisp :tangle yes
+ (setq ps-landscape-mode t)
+ (setq ps-number-of-columns 2)
+#+END_SRC
+
compilation output
#+BEGIN_SRC emacs-lisp :tangle yes
(if (bound-and-true-p bba-copyright-update)
(copyright-update))))
#+END_SRC
-#+END_SRC
* other stuff
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(blink-cursor-mode t)
- '(custom-safe-themes (quote ("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" default)))
+ '(custom-safe-themes
+ (quote
+ ("8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" default)))
'(gnuserv-program (concat exec-directory "/gnuserv"))
'(history-length 1000)
'(magit-commit-signoff t)
+ '(magit-git-global-arguments (quote ("--no-pager")))
'(magit-repo-dirs (quote ("~/git")))
- '(package-archives (quote (("gnu" . "http://elpa.gnu.org/packages/") ("marmalade" . "http://marmalade-repo.org/packages/") ("melpa" . "http://melpa.milkbox.net/packages/"))))
'(package-user-dir "~/.emacs.d/elpa")
'(paradox-github-token t)
- '(recentf-max-saved-items 42)
+ '(safe-local-variable-values (quote ((bba-keep-whitespaces . 1))))
'(template-default-directories (quote ("~/.emacs.d/templates/")))
'(toolbar-visible-p nil)
'(vc-handled-backends (quote (RCS CVS SVN SCCS Bzr Hg Mtn Arch))))
+++ /dev/null
-`helm-gtags.el' is a `helm' interface of GNU Global.
-`helm-gtags.el' is not compatible `anything-gtags.el', but `helm-gtags.el'
-is designed for fast search.
-
-
-To use this package, add these lines to your init.el or .emacs file:
-
- ;; Enable helm-gtags-mode
- (add-hook 'c-mode-hook 'helm-gtags-mode)
- (add-hook 'c++-mode-hook 'helm-gtags-mode)
- (add-hook 'asm-mode-hook 'helm-gtags-mode)
-
- ;; Set key bindings
- (eval-after-load "helm-gtags"
- '(progn
- (define-key helm-gtags-mode-map (kbd "M-t") 'helm-gtags-find-tag)
- (define-key helm-gtags-mode-map (kbd "M-r") 'helm-gtags-find-rtag)
- (define-key helm-gtags-mode-map (kbd "M-s") 'helm-gtags-find-symbol)
- (define-key helm-gtags-mode-map (kbd "M-g M-p") 'helm-gtags-parse-file)
- (define-key helm-gtags-mode-map (kbd "C-c <") 'helm-gtags-previous-history)
- (define-key helm-gtags-mode-map (kbd "C-c >") 'helm-gtags-next-history)
- (define-key helm-gtags-mode-map (kbd "M-,") 'helm-gtags-pop-stack)))