From 61739825d3e88088eae4db90aeaf7612f6ae9897 Mon Sep 17 00:00:00 2001 From: angrygoats Date: Wed, 13 Jun 2018 21:46:58 -0700 Subject: [PATCH 1/3] SDKMAN and meson mode --- dotfiles/emacs.d/init.el | 3 +++ dotfiles/emacs.d/package.el | 1 + dotfiles/zshrc | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 702623a..5e8e1ea 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -358,6 +358,9 @@ (add-hook 'c-mode-hook 'my-c-mode-hook) +;; I use meson mostly for C/C++ development so this hook lives here +(add-hook 'meson-mode-hook 'company-mode) + ;;-------------------------------------------------------------------------------------- ;; Java Mode Setup ;;------------------------------------------------------------------------------------- diff --git a/dotfiles/emacs.d/package.el b/dotfiles/emacs.d/package.el index c009a65..acb81d4 100644 --- a/dotfiles/emacs.d/package.el +++ b/dotfiles/emacs.d/package.el @@ -17,6 +17,7 @@ markdown-mode gitignore-mode feature-mode + meson-mode paredit magit ;;;;;;;;;;;;;;;;;;;; diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 3a5799c..3841139 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -137,3 +137,7 @@ if [ -f /home/$USER/.rvm/scripts/rvm ]; then source /home/$USER/.rvm/scripts/rvm fi + +#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! +export SDKMAN_DIR="/home/taylor/.sdkman" +[[ -s "/home/taylor/.sdkman/bin/sdkman-init.sh" ]] && source "/home/taylor/.sdkman/bin/sdkman-init.sh" From 410f8ac79f0e3b62218a91426299bfdb2249aeb3 Mon Sep 17 00:00:00 2001 From: angrygoats Date: Thu, 14 Jun 2018 20:35:32 -0700 Subject: [PATCH 2/3] Some C++ stuff --- dotfiles/emacs.d/init.el | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 5e8e1ea..987717f 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -192,24 +192,9 @@ ;; Add new line if using C-n navigates to the end of the buffer (setq next-line-add-newlines t) -;;-------------------------------------------------------------------------------------- -;; Fill column indicator (currently set to 120 characters) -;;-------------------------------------------------------------------------------------- - -(require 'fill-column-indicator) - -(setq fci-rule-color "red") -(setq fci-rule-column 120) -(setq fci-rule-width 1) -(setq fci-rule-character ?\u2503) ; Solid line unicode character - -;; A hack to work around FCI wanting to put itself everywhere -(define-globalized-minor-mode global-fci-mode fci-mode - (lambda () - (unless buffer-read-only - (fci-mode t)))) - -(global-fci-mode t) +(require 'whitespace) +(setq whitespace-style '(face lines-tail)) +(add-hook 'prog-mode-hook 'whitespace-mode) ;;-------------------------------------------------------------------------------------- ;; If python.el is loaded, change the rule column to 80 characters. @@ -217,7 +202,7 @@ (eval-after-load "python" '(progn - (setq fci-rule-column 80))) + (setq whitespace-line-column 80))) ;;-------------------------------------------------------------------------------------- ;; Expand region settings @@ -344,19 +329,32 @@ ;; Keep character limit to 80 (eval-after-load "c-mode" '(progn - (setq fci-rule-column 80))) + (setq whitespace-line-column 80))) + +(eval-after-load "c++-mode" + '(progn + (setq whitespace-line-column 80))) + (setq-default c-basic-offset 4) ;; NASA Style Guide says 4 spaces is optimal +(setq-default c++-basic-offset 4) ;; (setq-default c-default-style "linux") ;; Use Linux code style +(setq-default c++-default-style "linux") ;; (add-hook 'c-mode-hook 'irony-mode) +(add-hook 'c++-mode-hook 'irony-mode) ;; Backend for Company (defun my-c-mode-hook () (eval-after-load 'company '(add-to-list 'company-backends 'company-irony))) +(defun my-c++-mode-hook () + (eval-after-load 'company + '(add-to-list 'company-backends 'company-irony))) + (add-hook 'c-mode-hook 'my-c-mode-hook) +(add-hook 'c++-mode-hook 'my-c++-mode-hook) ;; I use meson mostly for C/C++ development so this hook lives here (add-hook 'meson-mode-hook 'company-mode) From 6928803c048f3fa8573f7c512cedd94ea963c988 Mon Sep 17 00:00:00 2001 From: angrygoats Date: Thu, 21 Jun 2018 17:43:39 -0700 Subject: [PATCH 3/3] ok --- dotfiles/Xmodmap | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dotfiles/Xmodmap b/dotfiles/Xmodmap index 85bd1fb..d15ebbb 100644 --- a/dotfiles/Xmodmap +++ b/dotfiles/Xmodmap @@ -1,9 +1,6 @@ ! -! Swap Caps_Lock and Control_R +! Remove caps lock and assign the left control to it. ! -remove Lock = Caps_Lock -remove Control = Control_R -keysym Control_R = Caps_Lock -keysym Caps_Lock = Control_R -add Lock = Caps_Lock -add Control = Control_R +keycode 66 = Control_L +clear Lock +add Control = Control_L