Skip to content

Commit

Permalink
mac and emacs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck Wooters committed Oct 17, 2020
1 parent 71b68a1 commit 2af3a9c
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 40 deletions.
1 change: 1 addition & 0 deletions bash/.bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PATH="$HOME/.cargo/bin:${PATH}"
PATH="/usr/local/opt/python/libexec/bin:${PATH}"
PATH="/usr/local/opt/sbt@0.13/bin:${PATH}"
PATH="${HOME}/bin:${PATH}"
PATH="${PATH}:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"

if [[ -f "${HOME}/.bash_profile_local" ]]; then
source ${HOME}/.bash_profile_local
Expand Down
7 changes: 3 additions & 4 deletions bash/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ "$(uname -s)" == "Darwin" ]; then

export LSCOLORS=gacacxdxbxegedabagacad
fi

if [ -f "$(/usr/local/bin/brew --prefix bash-completion)/etc/bash_completion" ]; then
source "$(brew --prefix bash-completion)/etc/bash_completion"
fi
Expand All @@ -23,7 +23,7 @@ if [ "$(uname -s)" == "Darwin" ]; then
fi

if [ -f "$(/usr/local/bin/brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then

function prompt_callback {
local cl_prompt
if [ -z ${HAVE_CL_BASH+x} ]; then
Expand All @@ -40,7 +40,7 @@ if [ "$(uname -s)" == "Darwin" ]; then
fi
fi
}

# For customization info see: https://github.com/magicmonty/bash-git-prompt
GIT_PROMPT_ONLY_IN_REPO=0
__GIT_PROMPT_DIR=$(brew --prefix)/opt/bash-git-prompt/share
Expand Down Expand Up @@ -78,4 +78,3 @@ if [[ -f "${HOME}/.bash_aliases" ]]; then
fi

[ -f ~/.fzf.bash ] && source ~/.fzf.bash

86 changes: 50 additions & 36 deletions emacs/.emacs.d/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,43 @@
;; NOTES:
;;
;; - To reload a file: M-x load-file
;; - To eval the code in the current buffer: M-x eval-buffer
;; - To execute a sexp, move the point to the end of the sexp and press c-x c-e
;; - To see the value of a variable, move point on top of var, then: c-h v
;; - Rectangle mode:
;; replace contents of rect w/ string: c-x r t
;; - Start kbd macro: F3, stop macro: F4, playback: F4
;;

(require 'package)

(setq-default
load-prefer-newer t
package-enable-at-startup nil)

(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)

(package-initialize)

(unless (and (package-installed-p 'delight)
(package-installed-p 'use-package))
(package-refresh-contents)
(package-install 'delight t)
(package-install 'use-package t))

(setq-default
use-package-always-defer t
use-package-always-ensure t)

(package-initialize nil)
(setq package-enable-at-startup nil)

(use-package org :ensure org-plus-contrib)


(setq inhibit-startup-screen t)

(defvar my-start-time (current-time)
"Time when Emacs was started")

Expand All @@ -23,30 +52,9 @@

(setq initial-scratch-message "")

;; Don't load old .elc files when the .el file is newer
(setq load-prefer-newer t)

(setq inhibit-startup-screen t)

(setq user-full-name "Chuck Wooters"
user-mail-address "ccwooters@gmail.com")
(package-initialize nil)
(setq package-enable-at-startup nil)

;; Add package repos before initialization
(require 'package)
(setq package-enable-at-startup nil
package-archives
'(("melpa" . "http://melpa.org/packages/")
("gnu" . "http://elpa.gnu.org/packages/")
("org" . "http://orgmode.org/elpa/")
("marmalade" . "http://marmalade-repo.org/packages")))

(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile
(require 'use-package))

(unless (package-installed-p 's) ;; String package
(package-refresh-contents)
Expand Down Expand Up @@ -95,15 +103,14 @@
:diminish yas-minor-mode
:commands yas-global-mode)

(setq yas-snippet-dirs '("/Users/wooters/projects/yasnippet-snippets"))
;(setq yas-snippet-dirs '("/Users/wooters/projects/yasnippet-snippets"))
(yas-global-mode 1)

(use-package org
:ensure t)


(use-package dumb-jump
:ensure t)

(use-package cc-mode
:ensure t
:bind (("C-c RET" . ff-find-related-file)
Expand Down Expand Up @@ -220,7 +227,7 @@
;; sbt-find-definitions is a command that tries to find (with grep)
;; the definition of the thing at point.
(local-set-key (kbd "M-.") 'sbt-find-definitions)

;; use sbt-run-previous-command to re-compile your code after changes
(local-set-key (kbd "C-x '") 'sbt-run-previous-command)

Expand Down Expand Up @@ -278,13 +285,20 @@
;; for more info:
;; https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html
;;
(org-babel-do-load-languages
'org-babel-load-languages
'((sh . t)
(scala . t)
(python . t)))
(setq org-babel-python-command (executable-find "python3"))
(setq org-confirm-babel-evaluate 'nil)



;(org-babel-do-load-languages
; 'org-babel-load-languages
; '((sh . t)
; (scala . t)
; (python . t)))
;(setq org-babel-python-command (executable-find "python3"))
;(setq org-confirm-babel-evaluate 'nil)


(use-package whitespace
:init
(dolist (hook '(prog-mode-hook text-mode-hook))
(add-hook hook #'whitespace-mode))
(add-hook 'before-save-hook #'whitespace-cleanup)
:config
(setq whitespace-line-column 80) ;; limit line length
(setq whitespace-style '(face tabs empty trailing lines-tail)))

0 comments on commit 2af3a9c

Please sign in to comment.